diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index d8e2462..2a72f97 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -16,7 +16,7 @@ OBJS= bitstream.o utils.o mem.o allcodec
       fft.o mdct.o raw.o golomb.o cabac.o\
       dpcm.o adx.o faandct.o parser.o g726.o \
       vp3dsp.o h264idct.o rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o \
-      opt.o
+      opt.o h264cavlc.o h264enc.o
 
 HEADERS = avcodec.h
 
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index f2d7520..17f11a8 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -195,6 +195,7 @@ #endif //CONFIG_LIBGSM
 #ifdef CONFIG_RAWVIDEO_ENCODER
     register_avcodec(&rawvideo_encoder);
 #endif //CONFIG_RAWVIDEO_ENCODER
+    register_avcodec(&h264_encoder);
 #endif /* CONFIG_ENCODERS */
 
     /* decoders */
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 0ba573e..82e6f78 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -121,6 +121,7 @@ enum CodecID {
     CODEC_ID_SMACKVIDEO,
     CODEC_ID_NUV,
     CODEC_ID_KMVC,
+    CODEC_ID_FFH264,
 
     /* various pcm "codecs" */
     CODEC_ID_PCM_S16LE= 0x10000,
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 15fdfcf..b9e4f26 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -147,20 +147,6 @@ typedef struct H264Context{
     MpegEncContext s;
     int nal_ref_idc;
     int nal_unit_type;
-#define NAL_SLICE                1
-#define NAL_DPA                  2
-#define NAL_DPB                  3
-#define NAL_DPC                  4
-#define NAL_IDR_SLICE            5
-#define NAL_SEI                  6
-#define NAL_SPS                  7
-#define NAL_PPS                  8
-#define NAL_AUD                  9
-#define NAL_END_SEQUENCE        10
-#define NAL_END_STREAM          11
-#define NAL_FILLER_DATA         12
-#define NAL_SPS_EXT             13
-#define NAL_AUXILIARY_SLICE     19
     uint8_t *rbsp_buffer;
     unsigned int rbsp_buffer_size;
 
diff --git a/libavcodec/h264cavlc.c b/libavcodec/h264cavlc.c
new file mode 100644
index 0000000..a638cfc
--- /dev/null
+++ b/libavcodec/h264cavlc.c
@@ -0,0 +1,2112 @@
+/*
+ * H.264 encoder
+ * Copyright (c) 2006 Expertisecentrum Digitale Media, UHasselt
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "common.h"
+#include "dsputil.h"
+#include "avcodec.h"
+#include "bitstream.h"
+#include "mpegvideo.h"
+#include "h264data.h"
+
+//#define DEBUG_H264CAVLC
+
+static inline void h264cavlc_encode_vlc_level(PutBitContext *b, int vlcnum, int level)
+{
+	static const int length_table[7][4095] = 
+	{
+		{
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,19,19,19,19,19,19,19,19,14,12,10,8,6,4,2,-1,
+			1,3,5,7,9,11,13,19,19,19,19,19,19,19,19,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28
+		},
+		{
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,
+			2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28
+		},
+		{
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,17,17,16,16,15,15,14,14,13,13,12,12,11,11,10,10,9,9,8,8,7,7,6,6,5,5,4,4,3,3,2,
+			3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28
+		},
+		{
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,18,18,18,18,17,17,17,17,16,16,16,16,15,15,15,15,14,14,14,14,13,13,13,13,12,12,12,12,11,
+			11,11,11,10,10,10,10,9,9,9,9,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,4,4,4,4,3,
+			4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,
+			12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28
+		},
+		{
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,19,19,19,19,19,19,19,19,18,18,18,18,18,18,18,18,17,17,17,17,17,17,17,17,16,
+			16,16,16,16,16,16,16,15,15,15,15,15,15,15,15,14,14,14,14,14,14,14,14,13,13,13,13,13,13,13,13,12,
+			12,12,12,12,12,12,12,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10,9,9,9,9,9,9,9,9,8,
+			8,8,8,8,8,8,8,7,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,4,
+			5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,
+			9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,
+			13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,
+			17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28
+		},
+		{
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,19,
+			19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,17,
+			17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,15,
+			15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13,
+			13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,
+			11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,
+			9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,
+			7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5,
+			6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+			8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
+			10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+			12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+			14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
+			16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+			18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+			20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28
+		},
+		{
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,21,
+			21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,
+			20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,19,
+			19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,
+			18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,17,
+			17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,16,
+			16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,15,
+			15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14,
+			14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,13,
+			13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,
+			12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,11,
+			11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,10,
+			10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,
+			9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,8,
+			8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,
+			7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,
+			7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+			8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
+			9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
+			10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,
+			11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,
+			12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,
+			13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,
+			14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
+			15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,
+			16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
+			17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
+			18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
+			19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
+			20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,
+			21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,
+			28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28
+		}
+	};
+	static const int code_table[7][4095] = 
+	{
+		{
+			8159,8157,8155,8153,8151,8149,8147,8145,8143,8141,8139,8137,8135,8133,8131,8129,8127,8125,8123,8121,8119,8117,8115,8113,8111,8109,8107,8105,8103,8101,8099,8097,
+			8095,8093,8091,8089,8087,8085,8083,8081,8079,8077,8075,8073,8071,8069,8067,8065,8063,8061,8059,8057,8055,8053,8051,8049,8047,8045,8043,8041,8039,8037,8035,8033,
+			8031,8029,8027,8025,8023,8021,8019,8017,8015,8013,8011,8009,8007,8005,8003,8001,7999,7997,7995,7993,7991,7989,7987,7985,7983,7981,7979,7977,7975,7973,7971,7969,
+			7967,7965,7963,7961,7959,7957,7955,7953,7951,7949,7947,7945,7943,7941,7939,7937,7935,7933,7931,7929,7927,7925,7923,7921,7919,7917,7915,7913,7911,7909,7907,7905,
+			7903,7901,7899,7897,7895,7893,7891,7889,7887,7885,7883,7881,7879,7877,7875,7873,7871,7869,7867,7865,7863,7861,7859,7857,7855,7853,7851,7849,7847,7845,7843,7841,
+			7839,7837,7835,7833,7831,7829,7827,7825,7823,7821,7819,7817,7815,7813,7811,7809,7807,7805,7803,7801,7799,7797,7795,7793,7791,7789,7787,7785,7783,7781,7779,7777,
+			7775,7773,7771,7769,7767,7765,7763,7761,7759,7757,7755,7753,7751,7749,7747,7745,7743,7741,7739,7737,7735,7733,7731,7729,7727,7725,7723,7721,7719,7717,7715,7713,
+			7711,7709,7707,7705,7703,7701,7699,7697,7695,7693,7691,7689,7687,7685,7683,7681,7679,7677,7675,7673,7671,7669,7667,7665,7663,7661,7659,7657,7655,7653,7651,7649,
+			7647,7645,7643,7641,7639,7637,7635,7633,7631,7629,7627,7625,7623,7621,7619,7617,7615,7613,7611,7609,7607,7605,7603,7601,7599,7597,7595,7593,7591,7589,7587,7585,
+			7583,7581,7579,7577,7575,7573,7571,7569,7567,7565,7563,7561,7559,7557,7555,7553,7551,7549,7547,7545,7543,7541,7539,7537,7535,7533,7531,7529,7527,7525,7523,7521,
+			7519,7517,7515,7513,7511,7509,7507,7505,7503,7501,7499,7497,7495,7493,7491,7489,7487,7485,7483,7481,7479,7477,7475,7473,7471,7469,7467,7465,7463,7461,7459,7457,
+			7455,7453,7451,7449,7447,7445,7443,7441,7439,7437,7435,7433,7431,7429,7427,7425,7423,7421,7419,7417,7415,7413,7411,7409,7407,7405,7403,7401,7399,7397,7395,7393,
+			7391,7389,7387,7385,7383,7381,7379,7377,7375,7373,7371,7369,7367,7365,7363,7361,7359,7357,7355,7353,7351,7349,7347,7345,7343,7341,7339,7337,7335,7333,7331,7329,
+			7327,7325,7323,7321,7319,7317,7315,7313,7311,7309,7307,7305,7303,7301,7299,7297,7295,7293,7291,7289,7287,7285,7283,7281,7279,7277,7275,7273,7271,7269,7267,7265,
+			7263,7261,7259,7257,7255,7253,7251,7249,7247,7245,7243,7241,7239,7237,7235,7233,7231,7229,7227,7225,7223,7221,7219,7217,7215,7213,7211,7209,7207,7205,7203,7201,
+			7199,7197,7195,7193,7191,7189,7187,7185,7183,7181,7179,7177,7175,7173,7171,7169,7167,7165,7163,7161,7159,7157,7155,7153,7151,7149,7147,7145,7143,7141,7139,7137,
+			7135,7133,7131,7129,7127,7125,7123,7121,7119,7117,7115,7113,7111,7109,7107,7105,7103,7101,7099,7097,7095,7093,7091,7089,7087,7085,7083,7081,7079,7077,7075,7073,
+			7071,7069,7067,7065,7063,7061,7059,7057,7055,7053,7051,7049,7047,7045,7043,7041,7039,7037,7035,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,
+			7007,7005,7003,7001,6999,6997,6995,6993,6991,6989,6987,6985,6983,6981,6979,6977,6975,6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,6947,6945,
+			6943,6941,6939,6937,6935,6933,6931,6929,6927,6925,6923,6921,6919,6917,6915,6913,6911,6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,6887,6885,6883,6881,
+			6879,6877,6875,6873,6871,6869,6867,6865,6863,6861,6859,6857,6855,6853,6851,6849,6847,6845,6843,6841,6839,6837,6835,6833,6831,6829,6827,6825,6823,6821,6819,6817,
+			6815,6813,6811,6809,6807,6805,6803,6801,6799,6797,6795,6793,6791,6789,6787,6785,6783,6781,6779,6777,6775,6773,6771,6769,6767,6765,6763,6761,6759,6757,6755,6753,
+			6751,6749,6747,6745,6743,6741,6739,6737,6735,6733,6731,6729,6727,6725,6723,6721,6719,6717,6715,6713,6711,6709,6707,6705,6703,6701,6699,6697,6695,6693,6691,6689,
+			6687,6685,6683,6681,6679,6677,6675,6673,6671,6669,6667,6665,6663,6661,6659,6657,6655,6653,6651,6649,6647,6645,6643,6641,6639,6637,6635,6633,6631,6629,6627,6625,
+			6623,6621,6619,6617,6615,6613,6611,6609,6607,6605,6603,6601,6599,6597,6595,6593,6591,6589,6587,6585,6583,6581,6579,6577,6575,6573,6571,6569,6567,6565,6563,6561,
+			6559,6557,6555,6553,6551,6549,6547,6545,6543,6541,6539,6537,6535,6533,6531,6529,6527,6525,6523,6521,6519,6517,6515,6513,6511,6509,6507,6505,6503,6501,6499,6497,
+			6495,6493,6491,6489,6487,6485,6483,6481,6479,6477,6475,6473,6471,6469,6467,6465,6463,6461,6459,6457,6455,6453,6451,6449,6447,6445,6443,6441,6439,6437,6435,6433,
+			6431,6429,6427,6425,6423,6421,6419,6417,6415,6413,6411,6409,6407,6405,6403,6401,6399,6397,6395,6393,6391,6389,6387,6385,6383,6381,6379,6377,6375,6373,6371,6369,
+			6367,6365,6363,6361,6359,6357,6355,6353,6351,6349,6347,6345,6343,6341,6339,6337,6335,6333,6331,6329,6327,6325,6323,6321,6319,6317,6315,6313,6311,6309,6307,6305,
+			6303,6301,6299,6297,6295,6293,6291,6289,6287,6285,6283,6281,6279,6277,6275,6273,6271,6269,6267,6265,6263,6261,6259,6257,6255,6253,6251,6249,6247,6245,6243,6241,
+			6239,6237,6235,6233,6231,6229,6227,6225,6223,6221,6219,6217,6215,6213,6211,6209,6207,6205,6203,6201,6199,6197,6195,6193,6191,6189,6187,6185,6183,6181,6179,6177,
+			6175,6173,6171,6169,6167,6165,6163,6161,6159,6157,6155,6153,6151,6149,6147,6145,6143,6141,6139,6137,6135,6133,6131,6129,6127,6125,6123,6121,6119,6117,6115,6113,
+			6111,6109,6107,6105,6103,6101,6099,6097,6095,6093,6091,6089,6087,6085,6083,6081,6079,6077,6075,6073,6071,6069,6067,6065,6063,6061,6059,6057,6055,6053,6051,6049,
+			6047,6045,6043,6041,6039,6037,6035,6033,6031,6029,6027,6025,6023,6021,6019,6017,6015,6013,6011,6009,6007,6005,6003,6001,5999,5997,5995,5993,5991,5989,5987,5985,
+			5983,5981,5979,5977,5975,5973,5971,5969,5967,5965,5963,5961,5959,5957,5955,5953,5951,5949,5947,5945,5943,5941,5939,5937,5935,5933,5931,5929,5927,5925,5923,5921,
+			5919,5917,5915,5913,5911,5909,5907,5905,5903,5901,5899,5897,5895,5893,5891,5889,5887,5885,5883,5881,5879,5877,5875,5873,5871,5869,5867,5865,5863,5861,5859,5857,
+			5855,5853,5851,5849,5847,5845,5843,5841,5839,5837,5835,5833,5831,5829,5827,5825,5823,5821,5819,5817,5815,5813,5811,5809,5807,5805,5803,5801,5799,5797,5795,5793,
+			5791,5789,5787,5785,5783,5781,5779,5777,5775,5773,5771,5769,5767,5765,5763,5761,5759,5757,5755,5753,5751,5749,5747,5745,5743,5741,5739,5737,5735,5733,5731,5729,
+			5727,5725,5723,5721,5719,5717,5715,5713,5711,5709,5707,5705,5703,5701,5699,5697,5695,5693,5691,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,
+			5663,5661,5659,5657,5655,5653,5651,5649,5647,5645,5643,5641,5639,5637,5635,5633,5631,5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,
+			5599,5597,5595,5593,5591,5589,5587,5585,5583,5581,5579,5577,5575,5573,5571,5569,5567,5565,5563,5561,5559,5557,5555,5553,5551,5549,5547,5545,5543,5541,5539,5537,
+			5535,5533,5531,5529,5527,5525,5523,5521,5519,5517,5515,5513,5511,5509,5507,5505,5503,5501,5499,5497,5495,5493,5491,5489,5487,5485,5483,5481,5479,5477,5475,5473,
+			5471,5469,5467,5465,5463,5461,5459,5457,5455,5453,5451,5449,5447,5445,5443,5441,5439,5437,5435,5433,5431,5429,5427,5425,5423,5421,5419,5417,5415,5413,5411,5409,
+			5407,5405,5403,5401,5399,5397,5395,5393,5391,5389,5387,5385,5383,5381,5379,5377,5375,5373,5371,5369,5367,5365,5363,5361,5359,5357,5355,5353,5351,5349,5347,5345,
+			5343,5341,5339,5337,5335,5333,5331,5329,5327,5325,5323,5321,5319,5317,5315,5313,5311,5309,5307,5305,5303,5301,5299,5297,5295,5293,5291,5289,5287,5285,5283,5281,
+			5279,5277,5275,5273,5271,5269,5267,5265,5263,5261,5259,5257,5255,5253,5251,5249,5247,5245,5243,5241,5239,5237,5235,5233,5231,5229,5227,5225,5223,5221,5219,5217,
+			5215,5213,5211,5209,5207,5205,5203,5201,5199,5197,5195,5193,5191,5189,5187,5185,5183,5181,5179,5177,5175,5173,5171,5169,5167,5165,5163,5161,5159,5157,5155,5153,
+			5151,5149,5147,5145,5143,5141,5139,5137,5135,5133,5131,5129,5127,5125,5123,5121,5119,5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,5093,5091,5089,
+			5087,5085,5083,5081,5079,5077,5075,5073,5071,5069,5067,5065,5063,5061,5059,5057,5055,5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,5033,5031,5029,5027,5025,
+			5023,5021,5019,5017,5015,5013,5011,5009,5007,5005,5003,5001,4999,4997,4995,4993,4991,4989,4987,4985,4983,4981,4979,4977,4975,4973,4971,4969,4967,4965,4963,4961,
+			4959,4957,4955,4953,4951,4949,4947,4945,4943,4941,4939,4937,4935,4933,4931,4929,4927,4925,4923,4921,4919,4917,4915,4913,4911,4909,4907,4905,4903,4901,4899,4897,
+			4895,4893,4891,4889,4887,4885,4883,4881,4879,4877,4875,4873,4871,4869,4867,4865,4863,4861,4859,4857,4855,4853,4851,4849,4847,4845,4843,4841,4839,4837,4835,4833,
+			4831,4829,4827,4825,4823,4821,4819,4817,4815,4813,4811,4809,4807,4805,4803,4801,4799,4797,4795,4793,4791,4789,4787,4785,4783,4781,4779,4777,4775,4773,4771,4769,
+			4767,4765,4763,4761,4759,4757,4755,4753,4751,4749,4747,4745,4743,4741,4739,4737,4735,4733,4731,4729,4727,4725,4723,4721,4719,4717,4715,4713,4711,4709,4707,4705,
+			4703,4701,4699,4697,4695,4693,4691,4689,4687,4685,4683,4681,4679,4677,4675,4673,4671,4669,4667,4665,4663,4661,4659,4657,4655,4653,4651,4649,4647,4645,4643,4641,
+			4639,4637,4635,4633,4631,4629,4627,4625,4623,4621,4619,4617,4615,4613,4611,4609,4607,4605,4603,4601,4599,4597,4595,4593,4591,4589,4587,4585,4583,4581,4579,4577,
+			4575,4573,4571,4569,4567,4565,4563,4561,4559,4557,4555,4553,4551,4549,4547,4545,4543,4541,4539,4537,4535,4533,4531,4529,4527,4525,4523,4521,4519,4517,4515,4513,
+			4511,4509,4507,4505,4503,4501,4499,4497,4495,4493,4491,4489,4487,4485,4483,4481,4479,4477,4475,4473,4471,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,
+			4447,4445,4443,4441,4439,4437,4435,4433,4431,4429,4427,4425,4423,4421,4419,4417,4415,4413,4411,4409,4407,4405,4403,4401,4399,4397,4395,4393,4391,4389,4387,4385,
+			4383,4381,4379,4377,4375,4373,4371,4369,4367,4365,4363,4361,4359,4357,4355,4353,4351,4349,4347,4345,4343,4341,4339,4337,4335,4333,4331,4329,4327,4325,4323,4321,
+			4319,4317,4315,4313,4311,4309,4307,4305,4303,4301,4299,4297,4295,4293,4291,4289,4287,4285,4283,4281,4279,4277,4275,4273,4271,4269,4267,4265,4263,4261,4259,4257,
+			4255,4253,4251,4249,4247,4245,4243,4241,4239,4237,4235,4233,4231,4229,4227,4225,4223,4221,4219,4217,4215,4213,4211,4209,4207,4205,4203,4201,4199,4197,4195,4193,
+			4191,4189,4187,4185,4183,4181,4179,4177,4175,4173,4171,4169,4167,4165,4163,4161,4159,4157,4155,4153,4151,4149,4147,4145,4143,4141,4139,4137,4135,4133,4131,4129,
+			4127,4125,4123,4121,4119,4117,4115,4113,4111,4109,4107,4105,4103,4101,4099,4097,31,29,27,25,23,21,19,17,1,1,1,1,1,1,1,1,
+			1,1,1,1,1,1,1,16,18,20,22,24,26,28,30,4096,4098,4100,4102,4104,4106,4108,4110,4112,4114,4116,4118,4120,4122,4124,4126,4128,
+			4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,4160,4162,4164,4166,4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,4192,
+			4194,4196,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226,4228,4230,4232,4234,4236,4238,4240,4242,4244,4246,4248,4250,4252,4254,4256,
+			4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,4288,4290,4292,4294,4296,4298,4300,4302,4304,4306,4308,4310,4312,4314,4316,4318,4320,
+			4322,4324,4326,4328,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,4352,4354,4356,4358,4360,4362,4364,4366,4368,4370,4372,4374,4376,4378,4380,4382,4384,
+			4386,4388,4390,4392,4394,4396,4398,4400,4402,4404,4406,4408,4410,4412,4414,4416,4418,4420,4422,4424,4426,4428,4430,4432,4434,4436,4438,4440,4442,4444,4446,4448,
+			4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472,4474,4476,4478,4480,4482,4484,4486,4488,4490,4492,4494,4496,4498,4500,4502,4504,4506,4508,4510,4512,
+			4514,4516,4518,4520,4522,4524,4526,4528,4530,4532,4534,4536,4538,4540,4542,4544,4546,4548,4550,4552,4554,4556,4558,4560,4562,4564,4566,4568,4570,4572,4574,4576,
+			4578,4580,4582,4584,4586,4588,4590,4592,4594,4596,4598,4600,4602,4604,4606,4608,4610,4612,4614,4616,4618,4620,4622,4624,4626,4628,4630,4632,4634,4636,4638,4640,
+			4642,4644,4646,4648,4650,4652,4654,4656,4658,4660,4662,4664,4666,4668,4670,4672,4674,4676,4678,4680,4682,4684,4686,4688,4690,4692,4694,4696,4698,4700,4702,4704,
+			4706,4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,4740,4742,4744,4746,4748,4750,4752,4754,4756,4758,4760,4762,4764,4766,4768,
+			4770,4772,4774,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,4800,4802,4804,4806,4808,4810,4812,4814,4816,4818,4820,4822,4824,4826,4828,4830,4832,
+			4834,4836,4838,4840,4842,4844,4846,4848,4850,4852,4854,4856,4858,4860,4862,4864,4866,4868,4870,4872,4874,4876,4878,4880,4882,4884,4886,4888,4890,4892,4894,4896,
+			4898,4900,4902,4904,4906,4908,4910,4912,4914,4916,4918,4920,4922,4924,4926,4928,4930,4932,4934,4936,4938,4940,4942,4944,4946,4948,4950,4952,4954,4956,4958,4960,
+			4962,4964,4966,4968,4970,4972,4974,4976,4978,4980,4982,4984,4986,4988,4990,4992,4994,4996,4998,5000,5002,5004,5006,5008,5010,5012,5014,5016,5018,5020,5022,5024,
+			5026,5028,5030,5032,5034,5036,5038,5040,5042,5044,5046,5048,5050,5052,5054,5056,5058,5060,5062,5064,5066,5068,5070,5072,5074,5076,5078,5080,5082,5084,5086,5088,
+			5090,5092,5094,5096,5098,5100,5102,5104,5106,5108,5110,5112,5114,5116,5118,5120,5122,5124,5126,5128,5130,5132,5134,5136,5138,5140,5142,5144,5146,5148,5150,5152,
+			5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5176,5178,5180,5182,5184,5186,5188,5190,5192,5194,5196,5198,5200,5202,5204,5206,5208,5210,5212,5214,5216,
+			5218,5220,5222,5224,5226,5228,5230,5232,5234,5236,5238,5240,5242,5244,5246,5248,5250,5252,5254,5256,5258,5260,5262,5264,5266,5268,5270,5272,5274,5276,5278,5280,
+			5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,5316,5318,5320,5322,5324,5326,5328,5330,5332,5334,5336,5338,5340,5342,5344,
+			5346,5348,5350,5352,5354,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,5376,5378,5380,5382,5384,5386,5388,5390,5392,5394,5396,5398,5400,5402,5404,5406,5408,
+			5410,5412,5414,5416,5418,5420,5422,5424,5426,5428,5430,5432,5434,5436,5438,5440,5442,5444,5446,5448,5450,5452,5454,5456,5458,5460,5462,5464,5466,5468,5470,5472,
+			5474,5476,5478,5480,5482,5484,5486,5488,5490,5492,5494,5496,5498,5500,5502,5504,5506,5508,5510,5512,5514,5516,5518,5520,5522,5524,5526,5528,5530,5532,5534,5536,
+			5538,5540,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5566,5568,5570,5572,5574,5576,5578,5580,5582,5584,5586,5588,5590,5592,5594,5596,5598,5600,
+			5602,5604,5606,5608,5610,5612,5614,5616,5618,5620,5622,5624,5626,5628,5630,5632,5634,5636,5638,5640,5642,5644,5646,5648,5650,5652,5654,5656,5658,5660,5662,5664,
+			5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,5696,5698,5700,5702,5704,5706,5708,5710,5712,5714,5716,5718,5720,5722,5724,5726,5728,
+			5730,5732,5734,5736,5738,5740,5742,5744,5746,5748,5750,5752,5754,5756,5758,5760,5762,5764,5766,5768,5770,5772,5774,5776,5778,5780,5782,5784,5786,5788,5790,5792,
+			5794,5796,5798,5800,5802,5804,5806,5808,5810,5812,5814,5816,5818,5820,5822,5824,5826,5828,5830,5832,5834,5836,5838,5840,5842,5844,5846,5848,5850,5852,5854,5856,
+			5858,5860,5862,5864,5866,5868,5870,5872,5874,5876,5878,5880,5882,5884,5886,5888,5890,5892,5894,5896,5898,5900,5902,5904,5906,5908,5910,5912,5914,5916,5918,5920,
+			5922,5924,5926,5928,5930,5932,5934,5936,5938,5940,5942,5944,5946,5948,5950,5952,5954,5956,5958,5960,5962,5964,5966,5968,5970,5972,5974,5976,5978,5980,5982,5984,
+			5986,5988,5990,5992,5994,5996,5998,6000,6002,6004,6006,6008,6010,6012,6014,6016,6018,6020,6022,6024,6026,6028,6030,6032,6034,6036,6038,6040,6042,6044,6046,6048,
+			6050,6052,6054,6056,6058,6060,6062,6064,6066,6068,6070,6072,6074,6076,6078,6080,6082,6084,6086,6088,6090,6092,6094,6096,6098,6100,6102,6104,6106,6108,6110,6112,
+			6114,6116,6118,6120,6122,6124,6126,6128,6130,6132,6134,6136,6138,6140,6142,6144,6146,6148,6150,6152,6154,6156,6158,6160,6162,6164,6166,6168,6170,6172,6174,6176,
+			6178,6180,6182,6184,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204,6206,6208,6210,6212,6214,6216,6218,6220,6222,6224,6226,6228,6230,6232,6234,6236,6238,6240,
+			6242,6244,6246,6248,6250,6252,6254,6256,6258,6260,6262,6264,6266,6268,6270,6272,6274,6276,6278,6280,6282,6284,6286,6288,6290,6292,6294,6296,6298,6300,6302,6304,
+			6306,6308,6310,6312,6314,6316,6318,6320,6322,6324,6326,6328,6330,6332,6334,6336,6338,6340,6342,6344,6346,6348,6350,6352,6354,6356,6358,6360,6362,6364,6366,6368,
+			6370,6372,6374,6376,6378,6380,6382,6384,6386,6388,6390,6392,6394,6396,6398,6400,6402,6404,6406,6408,6410,6412,6414,6416,6418,6420,6422,6424,6426,6428,6430,6432,
+			6434,6436,6438,6440,6442,6444,6446,6448,6450,6452,6454,6456,6458,6460,6462,6464,6466,6468,6470,6472,6474,6476,6478,6480,6482,6484,6486,6488,6490,6492,6494,6496,
+			6498,6500,6502,6504,6506,6508,6510,6512,6514,6516,6518,6520,6522,6524,6526,6528,6530,6532,6534,6536,6538,6540,6542,6544,6546,6548,6550,6552,6554,6556,6558,6560,
+			6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,6582,6584,6586,6588,6590,6592,6594,6596,6598,6600,6602,6604,6606,6608,6610,6612,6614,6616,6618,6620,6622,6624,
+			6626,6628,6630,6632,6634,6636,6638,6640,6642,6644,6646,6648,6650,6652,6654,6656,6658,6660,6662,6664,6666,6668,6670,6672,6674,6676,6678,6680,6682,6684,6686,6688,
+			6690,6692,6694,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716,6718,6720,6722,6724,6726,6728,6730,6732,6734,6736,6738,6740,6742,6744,6746,6748,6750,6752,
+			6754,6756,6758,6760,6762,6764,6766,6768,6770,6772,6774,6776,6778,6780,6782,6784,6786,6788,6790,6792,6794,6796,6798,6800,6802,6804,6806,6808,6810,6812,6814,6816,
+			6818,6820,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840,6842,6844,6846,6848,6850,6852,6854,6856,6858,6860,6862,6864,6866,6868,6870,6872,6874,6876,6878,6880,
+			6882,6884,6886,6888,6890,6892,6894,6896,6898,6900,6902,6904,6906,6908,6910,6912,6914,6916,6918,6920,6922,6924,6926,6928,6930,6932,6934,6936,6938,6940,6942,6944,
+			6946,6948,6950,6952,6954,6956,6958,6960,6962,6964,6966,6968,6970,6972,6974,6976,6978,6980,6982,6984,6986,6988,6990,6992,6994,6996,6998,7000,7002,7004,7006,7008,
+			7010,7012,7014,7016,7018,7020,7022,7024,7026,7028,7030,7032,7034,7036,7038,7040,7042,7044,7046,7048,7050,7052,7054,7056,7058,7060,7062,7064,7066,7068,7070,7072,
+			7074,7076,7078,7080,7082,7084,7086,7088,7090,7092,7094,7096,7098,7100,7102,7104,7106,7108,7110,7112,7114,7116,7118,7120,7122,7124,7126,7128,7130,7132,7134,7136,
+			7138,7140,7142,7144,7146,7148,7150,7152,7154,7156,7158,7160,7162,7164,7166,7168,7170,7172,7174,7176,7178,7180,7182,7184,7186,7188,7190,7192,7194,7196,7198,7200,
+			7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,7228,7230,7232,7234,7236,7238,7240,7242,7244,7246,7248,7250,7252,7254,7256,7258,7260,7262,7264,
+			7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,
+			7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7372,7374,7376,7378,7380,7382,7384,7386,7388,7390,7392,
+			7394,7396,7398,7400,7402,7404,7406,7408,7410,7412,7414,7416,7418,7420,7422,7424,7426,7428,7430,7432,7434,7436,7438,7440,7442,7444,7446,7448,7450,7452,7454,7456,
+			7458,7460,7462,7464,7466,7468,7470,7472,7474,7476,7478,7480,7482,7484,7486,7488,7490,7492,7494,7496,7498,7500,7502,7504,7506,7508,7510,7512,7514,7516,7518,7520,
+			7522,7524,7526,7528,7530,7532,7534,7536,7538,7540,7542,7544,7546,7548,7550,7552,7554,7556,7558,7560,7562,7564,7566,7568,7570,7572,7574,7576,7578,7580,7582,7584,
+			7586,7588,7590,7592,7594,7596,7598,7600,7602,7604,7606,7608,7610,7612,7614,7616,7618,7620,7622,7624,7626,7628,7630,7632,7634,7636,7638,7640,7642,7644,7646,7648,
+			7650,7652,7654,7656,7658,7660,7662,7664,7666,7668,7670,7672,7674,7676,7678,7680,7682,7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,
+			7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,
+			7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,7816,7818,7820,7822,7824,7826,7828,7830,7832,7834,7836,7838,7840,
+			7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,
+			7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,7936,7938,7940,7942,7944,7946,7948,7950,7952,7954,7956,7958,7960,7962,7964,7966,7968,
+			7970,7972,7974,7976,7978,7980,7982,7984,7986,7988,7990,7992,7994,7996,7998,8000,8002,8004,8006,8008,8010,8012,8014,8016,8018,8020,8022,8024,8026,8028,8030,8032,
+			8034,8036,8038,8040,8042,8044,8046,8048,8050,8052,8054,8056,8058,8060,8062,8064,8066,8068,8070,8072,8074,8076,8078,8080,8082,8084,8086,8088,8090,8092,8094,8096,
+			8098,8100,8102,8104,8106,8108,8110,8112,8114,8116,8118,8120,8122,8124,8126,8128,8130,8132,8134,8136,8138,8140,8142,8144,8146,8148,8150,8152,8154,8156,8158
+		},
+		{
+			8159,8157,8155,8153,8151,8149,8147,8145,8143,8141,8139,8137,8135,8133,8131,8129,8127,8125,8123,8121,8119,8117,8115,8113,8111,8109,8107,8105,8103,8101,8099,8097,
+			8095,8093,8091,8089,8087,8085,8083,8081,8079,8077,8075,8073,8071,8069,8067,8065,8063,8061,8059,8057,8055,8053,8051,8049,8047,8045,8043,8041,8039,8037,8035,8033,
+			8031,8029,8027,8025,8023,8021,8019,8017,8015,8013,8011,8009,8007,8005,8003,8001,7999,7997,7995,7993,7991,7989,7987,7985,7983,7981,7979,7977,7975,7973,7971,7969,
+			7967,7965,7963,7961,7959,7957,7955,7953,7951,7949,7947,7945,7943,7941,7939,7937,7935,7933,7931,7929,7927,7925,7923,7921,7919,7917,7915,7913,7911,7909,7907,7905,
+			7903,7901,7899,7897,7895,7893,7891,7889,7887,7885,7883,7881,7879,7877,7875,7873,7871,7869,7867,7865,7863,7861,7859,7857,7855,7853,7851,7849,7847,7845,7843,7841,
+			7839,7837,7835,7833,7831,7829,7827,7825,7823,7821,7819,7817,7815,7813,7811,7809,7807,7805,7803,7801,7799,7797,7795,7793,7791,7789,7787,7785,7783,7781,7779,7777,
+			7775,7773,7771,7769,7767,7765,7763,7761,7759,7757,7755,7753,7751,7749,7747,7745,7743,7741,7739,7737,7735,7733,7731,7729,7727,7725,7723,7721,7719,7717,7715,7713,
+			7711,7709,7707,7705,7703,7701,7699,7697,7695,7693,7691,7689,7687,7685,7683,7681,7679,7677,7675,7673,7671,7669,7667,7665,7663,7661,7659,7657,7655,7653,7651,7649,
+			7647,7645,7643,7641,7639,7637,7635,7633,7631,7629,7627,7625,7623,7621,7619,7617,7615,7613,7611,7609,7607,7605,7603,7601,7599,7597,7595,7593,7591,7589,7587,7585,
+			7583,7581,7579,7577,7575,7573,7571,7569,7567,7565,7563,7561,7559,7557,7555,7553,7551,7549,7547,7545,7543,7541,7539,7537,7535,7533,7531,7529,7527,7525,7523,7521,
+			7519,7517,7515,7513,7511,7509,7507,7505,7503,7501,7499,7497,7495,7493,7491,7489,7487,7485,7483,7481,7479,7477,7475,7473,7471,7469,7467,7465,7463,7461,7459,7457,
+			7455,7453,7451,7449,7447,7445,7443,7441,7439,7437,7435,7433,7431,7429,7427,7425,7423,7421,7419,7417,7415,7413,7411,7409,7407,7405,7403,7401,7399,7397,7395,7393,
+			7391,7389,7387,7385,7383,7381,7379,7377,7375,7373,7371,7369,7367,7365,7363,7361,7359,7357,7355,7353,7351,7349,7347,7345,7343,7341,7339,7337,7335,7333,7331,7329,
+			7327,7325,7323,7321,7319,7317,7315,7313,7311,7309,7307,7305,7303,7301,7299,7297,7295,7293,7291,7289,7287,7285,7283,7281,7279,7277,7275,7273,7271,7269,7267,7265,
+			7263,7261,7259,7257,7255,7253,7251,7249,7247,7245,7243,7241,7239,7237,7235,7233,7231,7229,7227,7225,7223,7221,7219,7217,7215,7213,7211,7209,7207,7205,7203,7201,
+			7199,7197,7195,7193,7191,7189,7187,7185,7183,7181,7179,7177,7175,7173,7171,7169,7167,7165,7163,7161,7159,7157,7155,7153,7151,7149,7147,7145,7143,7141,7139,7137,
+			7135,7133,7131,7129,7127,7125,7123,7121,7119,7117,7115,7113,7111,7109,7107,7105,7103,7101,7099,7097,7095,7093,7091,7089,7087,7085,7083,7081,7079,7077,7075,7073,
+			7071,7069,7067,7065,7063,7061,7059,7057,7055,7053,7051,7049,7047,7045,7043,7041,7039,7037,7035,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,
+			7007,7005,7003,7001,6999,6997,6995,6993,6991,6989,6987,6985,6983,6981,6979,6977,6975,6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,6947,6945,
+			6943,6941,6939,6937,6935,6933,6931,6929,6927,6925,6923,6921,6919,6917,6915,6913,6911,6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,6887,6885,6883,6881,
+			6879,6877,6875,6873,6871,6869,6867,6865,6863,6861,6859,6857,6855,6853,6851,6849,6847,6845,6843,6841,6839,6837,6835,6833,6831,6829,6827,6825,6823,6821,6819,6817,
+			6815,6813,6811,6809,6807,6805,6803,6801,6799,6797,6795,6793,6791,6789,6787,6785,6783,6781,6779,6777,6775,6773,6771,6769,6767,6765,6763,6761,6759,6757,6755,6753,
+			6751,6749,6747,6745,6743,6741,6739,6737,6735,6733,6731,6729,6727,6725,6723,6721,6719,6717,6715,6713,6711,6709,6707,6705,6703,6701,6699,6697,6695,6693,6691,6689,
+			6687,6685,6683,6681,6679,6677,6675,6673,6671,6669,6667,6665,6663,6661,6659,6657,6655,6653,6651,6649,6647,6645,6643,6641,6639,6637,6635,6633,6631,6629,6627,6625,
+			6623,6621,6619,6617,6615,6613,6611,6609,6607,6605,6603,6601,6599,6597,6595,6593,6591,6589,6587,6585,6583,6581,6579,6577,6575,6573,6571,6569,6567,6565,6563,6561,
+			6559,6557,6555,6553,6551,6549,6547,6545,6543,6541,6539,6537,6535,6533,6531,6529,6527,6525,6523,6521,6519,6517,6515,6513,6511,6509,6507,6505,6503,6501,6499,6497,
+			6495,6493,6491,6489,6487,6485,6483,6481,6479,6477,6475,6473,6471,6469,6467,6465,6463,6461,6459,6457,6455,6453,6451,6449,6447,6445,6443,6441,6439,6437,6435,6433,
+			6431,6429,6427,6425,6423,6421,6419,6417,6415,6413,6411,6409,6407,6405,6403,6401,6399,6397,6395,6393,6391,6389,6387,6385,6383,6381,6379,6377,6375,6373,6371,6369,
+			6367,6365,6363,6361,6359,6357,6355,6353,6351,6349,6347,6345,6343,6341,6339,6337,6335,6333,6331,6329,6327,6325,6323,6321,6319,6317,6315,6313,6311,6309,6307,6305,
+			6303,6301,6299,6297,6295,6293,6291,6289,6287,6285,6283,6281,6279,6277,6275,6273,6271,6269,6267,6265,6263,6261,6259,6257,6255,6253,6251,6249,6247,6245,6243,6241,
+			6239,6237,6235,6233,6231,6229,6227,6225,6223,6221,6219,6217,6215,6213,6211,6209,6207,6205,6203,6201,6199,6197,6195,6193,6191,6189,6187,6185,6183,6181,6179,6177,
+			6175,6173,6171,6169,6167,6165,6163,6161,6159,6157,6155,6153,6151,6149,6147,6145,6143,6141,6139,6137,6135,6133,6131,6129,6127,6125,6123,6121,6119,6117,6115,6113,
+			6111,6109,6107,6105,6103,6101,6099,6097,6095,6093,6091,6089,6087,6085,6083,6081,6079,6077,6075,6073,6071,6069,6067,6065,6063,6061,6059,6057,6055,6053,6051,6049,
+			6047,6045,6043,6041,6039,6037,6035,6033,6031,6029,6027,6025,6023,6021,6019,6017,6015,6013,6011,6009,6007,6005,6003,6001,5999,5997,5995,5993,5991,5989,5987,5985,
+			5983,5981,5979,5977,5975,5973,5971,5969,5967,5965,5963,5961,5959,5957,5955,5953,5951,5949,5947,5945,5943,5941,5939,5937,5935,5933,5931,5929,5927,5925,5923,5921,
+			5919,5917,5915,5913,5911,5909,5907,5905,5903,5901,5899,5897,5895,5893,5891,5889,5887,5885,5883,5881,5879,5877,5875,5873,5871,5869,5867,5865,5863,5861,5859,5857,
+			5855,5853,5851,5849,5847,5845,5843,5841,5839,5837,5835,5833,5831,5829,5827,5825,5823,5821,5819,5817,5815,5813,5811,5809,5807,5805,5803,5801,5799,5797,5795,5793,
+			5791,5789,5787,5785,5783,5781,5779,5777,5775,5773,5771,5769,5767,5765,5763,5761,5759,5757,5755,5753,5751,5749,5747,5745,5743,5741,5739,5737,5735,5733,5731,5729,
+			5727,5725,5723,5721,5719,5717,5715,5713,5711,5709,5707,5705,5703,5701,5699,5697,5695,5693,5691,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,
+			5663,5661,5659,5657,5655,5653,5651,5649,5647,5645,5643,5641,5639,5637,5635,5633,5631,5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,
+			5599,5597,5595,5593,5591,5589,5587,5585,5583,5581,5579,5577,5575,5573,5571,5569,5567,5565,5563,5561,5559,5557,5555,5553,5551,5549,5547,5545,5543,5541,5539,5537,
+			5535,5533,5531,5529,5527,5525,5523,5521,5519,5517,5515,5513,5511,5509,5507,5505,5503,5501,5499,5497,5495,5493,5491,5489,5487,5485,5483,5481,5479,5477,5475,5473,
+			5471,5469,5467,5465,5463,5461,5459,5457,5455,5453,5451,5449,5447,5445,5443,5441,5439,5437,5435,5433,5431,5429,5427,5425,5423,5421,5419,5417,5415,5413,5411,5409,
+			5407,5405,5403,5401,5399,5397,5395,5393,5391,5389,5387,5385,5383,5381,5379,5377,5375,5373,5371,5369,5367,5365,5363,5361,5359,5357,5355,5353,5351,5349,5347,5345,
+			5343,5341,5339,5337,5335,5333,5331,5329,5327,5325,5323,5321,5319,5317,5315,5313,5311,5309,5307,5305,5303,5301,5299,5297,5295,5293,5291,5289,5287,5285,5283,5281,
+			5279,5277,5275,5273,5271,5269,5267,5265,5263,5261,5259,5257,5255,5253,5251,5249,5247,5245,5243,5241,5239,5237,5235,5233,5231,5229,5227,5225,5223,5221,5219,5217,
+			5215,5213,5211,5209,5207,5205,5203,5201,5199,5197,5195,5193,5191,5189,5187,5185,5183,5181,5179,5177,5175,5173,5171,5169,5167,5165,5163,5161,5159,5157,5155,5153,
+			5151,5149,5147,5145,5143,5141,5139,5137,5135,5133,5131,5129,5127,5125,5123,5121,5119,5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,5093,5091,5089,
+			5087,5085,5083,5081,5079,5077,5075,5073,5071,5069,5067,5065,5063,5061,5059,5057,5055,5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,5033,5031,5029,5027,5025,
+			5023,5021,5019,5017,5015,5013,5011,5009,5007,5005,5003,5001,4999,4997,4995,4993,4991,4989,4987,4985,4983,4981,4979,4977,4975,4973,4971,4969,4967,4965,4963,4961,
+			4959,4957,4955,4953,4951,4949,4947,4945,4943,4941,4939,4937,4935,4933,4931,4929,4927,4925,4923,4921,4919,4917,4915,4913,4911,4909,4907,4905,4903,4901,4899,4897,
+			4895,4893,4891,4889,4887,4885,4883,4881,4879,4877,4875,4873,4871,4869,4867,4865,4863,4861,4859,4857,4855,4853,4851,4849,4847,4845,4843,4841,4839,4837,4835,4833,
+			4831,4829,4827,4825,4823,4821,4819,4817,4815,4813,4811,4809,4807,4805,4803,4801,4799,4797,4795,4793,4791,4789,4787,4785,4783,4781,4779,4777,4775,4773,4771,4769,
+			4767,4765,4763,4761,4759,4757,4755,4753,4751,4749,4747,4745,4743,4741,4739,4737,4735,4733,4731,4729,4727,4725,4723,4721,4719,4717,4715,4713,4711,4709,4707,4705,
+			4703,4701,4699,4697,4695,4693,4691,4689,4687,4685,4683,4681,4679,4677,4675,4673,4671,4669,4667,4665,4663,4661,4659,4657,4655,4653,4651,4649,4647,4645,4643,4641,
+			4639,4637,4635,4633,4631,4629,4627,4625,4623,4621,4619,4617,4615,4613,4611,4609,4607,4605,4603,4601,4599,4597,4595,4593,4591,4589,4587,4585,4583,4581,4579,4577,
+			4575,4573,4571,4569,4567,4565,4563,4561,4559,4557,4555,4553,4551,4549,4547,4545,4543,4541,4539,4537,4535,4533,4531,4529,4527,4525,4523,4521,4519,4517,4515,4513,
+			4511,4509,4507,4505,4503,4501,4499,4497,4495,4493,4491,4489,4487,4485,4483,4481,4479,4477,4475,4473,4471,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,
+			4447,4445,4443,4441,4439,4437,4435,4433,4431,4429,4427,4425,4423,4421,4419,4417,4415,4413,4411,4409,4407,4405,4403,4401,4399,4397,4395,4393,4391,4389,4387,4385,
+			4383,4381,4379,4377,4375,4373,4371,4369,4367,4365,4363,4361,4359,4357,4355,4353,4351,4349,4347,4345,4343,4341,4339,4337,4335,4333,4331,4329,4327,4325,4323,4321,
+			4319,4317,4315,4313,4311,4309,4307,4305,4303,4301,4299,4297,4295,4293,4291,4289,4287,4285,4283,4281,4279,4277,4275,4273,4271,4269,4267,4265,4263,4261,4259,4257,
+			4255,4253,4251,4249,4247,4245,4243,4241,4239,4237,4235,4233,4231,4229,4227,4225,4223,4221,4219,4217,4215,4213,4211,4209,4207,4205,4203,4201,4199,4197,4195,4193,
+			4191,4189,4187,4185,4183,4181,4179,4177,4175,4173,4171,4169,4167,4165,4163,4161,4159,4157,4155,4153,4151,4149,4147,4145,4143,4141,4139,4137,4135,4133,4131,4129,
+			4127,4125,4123,4121,4119,4117,4115,4113,4111,4109,4107,4105,4103,4101,4099,4097,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,
+			2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,4096,4098,4100,4102,4104,4106,4108,4110,4112,4114,4116,4118,4120,4122,4124,4126,4128,
+			4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,4160,4162,4164,4166,4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,4192,
+			4194,4196,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226,4228,4230,4232,4234,4236,4238,4240,4242,4244,4246,4248,4250,4252,4254,4256,
+			4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,4288,4290,4292,4294,4296,4298,4300,4302,4304,4306,4308,4310,4312,4314,4316,4318,4320,
+			4322,4324,4326,4328,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,4352,4354,4356,4358,4360,4362,4364,4366,4368,4370,4372,4374,4376,4378,4380,4382,4384,
+			4386,4388,4390,4392,4394,4396,4398,4400,4402,4404,4406,4408,4410,4412,4414,4416,4418,4420,4422,4424,4426,4428,4430,4432,4434,4436,4438,4440,4442,4444,4446,4448,
+			4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472,4474,4476,4478,4480,4482,4484,4486,4488,4490,4492,4494,4496,4498,4500,4502,4504,4506,4508,4510,4512,
+			4514,4516,4518,4520,4522,4524,4526,4528,4530,4532,4534,4536,4538,4540,4542,4544,4546,4548,4550,4552,4554,4556,4558,4560,4562,4564,4566,4568,4570,4572,4574,4576,
+			4578,4580,4582,4584,4586,4588,4590,4592,4594,4596,4598,4600,4602,4604,4606,4608,4610,4612,4614,4616,4618,4620,4622,4624,4626,4628,4630,4632,4634,4636,4638,4640,
+			4642,4644,4646,4648,4650,4652,4654,4656,4658,4660,4662,4664,4666,4668,4670,4672,4674,4676,4678,4680,4682,4684,4686,4688,4690,4692,4694,4696,4698,4700,4702,4704,
+			4706,4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,4740,4742,4744,4746,4748,4750,4752,4754,4756,4758,4760,4762,4764,4766,4768,
+			4770,4772,4774,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,4800,4802,4804,4806,4808,4810,4812,4814,4816,4818,4820,4822,4824,4826,4828,4830,4832,
+			4834,4836,4838,4840,4842,4844,4846,4848,4850,4852,4854,4856,4858,4860,4862,4864,4866,4868,4870,4872,4874,4876,4878,4880,4882,4884,4886,4888,4890,4892,4894,4896,
+			4898,4900,4902,4904,4906,4908,4910,4912,4914,4916,4918,4920,4922,4924,4926,4928,4930,4932,4934,4936,4938,4940,4942,4944,4946,4948,4950,4952,4954,4956,4958,4960,
+			4962,4964,4966,4968,4970,4972,4974,4976,4978,4980,4982,4984,4986,4988,4990,4992,4994,4996,4998,5000,5002,5004,5006,5008,5010,5012,5014,5016,5018,5020,5022,5024,
+			5026,5028,5030,5032,5034,5036,5038,5040,5042,5044,5046,5048,5050,5052,5054,5056,5058,5060,5062,5064,5066,5068,5070,5072,5074,5076,5078,5080,5082,5084,5086,5088,
+			5090,5092,5094,5096,5098,5100,5102,5104,5106,5108,5110,5112,5114,5116,5118,5120,5122,5124,5126,5128,5130,5132,5134,5136,5138,5140,5142,5144,5146,5148,5150,5152,
+			5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5176,5178,5180,5182,5184,5186,5188,5190,5192,5194,5196,5198,5200,5202,5204,5206,5208,5210,5212,5214,5216,
+			5218,5220,5222,5224,5226,5228,5230,5232,5234,5236,5238,5240,5242,5244,5246,5248,5250,5252,5254,5256,5258,5260,5262,5264,5266,5268,5270,5272,5274,5276,5278,5280,
+			5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,5316,5318,5320,5322,5324,5326,5328,5330,5332,5334,5336,5338,5340,5342,5344,
+			5346,5348,5350,5352,5354,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,5376,5378,5380,5382,5384,5386,5388,5390,5392,5394,5396,5398,5400,5402,5404,5406,5408,
+			5410,5412,5414,5416,5418,5420,5422,5424,5426,5428,5430,5432,5434,5436,5438,5440,5442,5444,5446,5448,5450,5452,5454,5456,5458,5460,5462,5464,5466,5468,5470,5472,
+			5474,5476,5478,5480,5482,5484,5486,5488,5490,5492,5494,5496,5498,5500,5502,5504,5506,5508,5510,5512,5514,5516,5518,5520,5522,5524,5526,5528,5530,5532,5534,5536,
+			5538,5540,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5566,5568,5570,5572,5574,5576,5578,5580,5582,5584,5586,5588,5590,5592,5594,5596,5598,5600,
+			5602,5604,5606,5608,5610,5612,5614,5616,5618,5620,5622,5624,5626,5628,5630,5632,5634,5636,5638,5640,5642,5644,5646,5648,5650,5652,5654,5656,5658,5660,5662,5664,
+			5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,5696,5698,5700,5702,5704,5706,5708,5710,5712,5714,5716,5718,5720,5722,5724,5726,5728,
+			5730,5732,5734,5736,5738,5740,5742,5744,5746,5748,5750,5752,5754,5756,5758,5760,5762,5764,5766,5768,5770,5772,5774,5776,5778,5780,5782,5784,5786,5788,5790,5792,
+			5794,5796,5798,5800,5802,5804,5806,5808,5810,5812,5814,5816,5818,5820,5822,5824,5826,5828,5830,5832,5834,5836,5838,5840,5842,5844,5846,5848,5850,5852,5854,5856,
+			5858,5860,5862,5864,5866,5868,5870,5872,5874,5876,5878,5880,5882,5884,5886,5888,5890,5892,5894,5896,5898,5900,5902,5904,5906,5908,5910,5912,5914,5916,5918,5920,
+			5922,5924,5926,5928,5930,5932,5934,5936,5938,5940,5942,5944,5946,5948,5950,5952,5954,5956,5958,5960,5962,5964,5966,5968,5970,5972,5974,5976,5978,5980,5982,5984,
+			5986,5988,5990,5992,5994,5996,5998,6000,6002,6004,6006,6008,6010,6012,6014,6016,6018,6020,6022,6024,6026,6028,6030,6032,6034,6036,6038,6040,6042,6044,6046,6048,
+			6050,6052,6054,6056,6058,6060,6062,6064,6066,6068,6070,6072,6074,6076,6078,6080,6082,6084,6086,6088,6090,6092,6094,6096,6098,6100,6102,6104,6106,6108,6110,6112,
+			6114,6116,6118,6120,6122,6124,6126,6128,6130,6132,6134,6136,6138,6140,6142,6144,6146,6148,6150,6152,6154,6156,6158,6160,6162,6164,6166,6168,6170,6172,6174,6176,
+			6178,6180,6182,6184,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204,6206,6208,6210,6212,6214,6216,6218,6220,6222,6224,6226,6228,6230,6232,6234,6236,6238,6240,
+			6242,6244,6246,6248,6250,6252,6254,6256,6258,6260,6262,6264,6266,6268,6270,6272,6274,6276,6278,6280,6282,6284,6286,6288,6290,6292,6294,6296,6298,6300,6302,6304,
+			6306,6308,6310,6312,6314,6316,6318,6320,6322,6324,6326,6328,6330,6332,6334,6336,6338,6340,6342,6344,6346,6348,6350,6352,6354,6356,6358,6360,6362,6364,6366,6368,
+			6370,6372,6374,6376,6378,6380,6382,6384,6386,6388,6390,6392,6394,6396,6398,6400,6402,6404,6406,6408,6410,6412,6414,6416,6418,6420,6422,6424,6426,6428,6430,6432,
+			6434,6436,6438,6440,6442,6444,6446,6448,6450,6452,6454,6456,6458,6460,6462,6464,6466,6468,6470,6472,6474,6476,6478,6480,6482,6484,6486,6488,6490,6492,6494,6496,
+			6498,6500,6502,6504,6506,6508,6510,6512,6514,6516,6518,6520,6522,6524,6526,6528,6530,6532,6534,6536,6538,6540,6542,6544,6546,6548,6550,6552,6554,6556,6558,6560,
+			6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,6582,6584,6586,6588,6590,6592,6594,6596,6598,6600,6602,6604,6606,6608,6610,6612,6614,6616,6618,6620,6622,6624,
+			6626,6628,6630,6632,6634,6636,6638,6640,6642,6644,6646,6648,6650,6652,6654,6656,6658,6660,6662,6664,6666,6668,6670,6672,6674,6676,6678,6680,6682,6684,6686,6688,
+			6690,6692,6694,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716,6718,6720,6722,6724,6726,6728,6730,6732,6734,6736,6738,6740,6742,6744,6746,6748,6750,6752,
+			6754,6756,6758,6760,6762,6764,6766,6768,6770,6772,6774,6776,6778,6780,6782,6784,6786,6788,6790,6792,6794,6796,6798,6800,6802,6804,6806,6808,6810,6812,6814,6816,
+			6818,6820,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840,6842,6844,6846,6848,6850,6852,6854,6856,6858,6860,6862,6864,6866,6868,6870,6872,6874,6876,6878,6880,
+			6882,6884,6886,6888,6890,6892,6894,6896,6898,6900,6902,6904,6906,6908,6910,6912,6914,6916,6918,6920,6922,6924,6926,6928,6930,6932,6934,6936,6938,6940,6942,6944,
+			6946,6948,6950,6952,6954,6956,6958,6960,6962,6964,6966,6968,6970,6972,6974,6976,6978,6980,6982,6984,6986,6988,6990,6992,6994,6996,6998,7000,7002,7004,7006,7008,
+			7010,7012,7014,7016,7018,7020,7022,7024,7026,7028,7030,7032,7034,7036,7038,7040,7042,7044,7046,7048,7050,7052,7054,7056,7058,7060,7062,7064,7066,7068,7070,7072,
+			7074,7076,7078,7080,7082,7084,7086,7088,7090,7092,7094,7096,7098,7100,7102,7104,7106,7108,7110,7112,7114,7116,7118,7120,7122,7124,7126,7128,7130,7132,7134,7136,
+			7138,7140,7142,7144,7146,7148,7150,7152,7154,7156,7158,7160,7162,7164,7166,7168,7170,7172,7174,7176,7178,7180,7182,7184,7186,7188,7190,7192,7194,7196,7198,7200,
+			7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,7228,7230,7232,7234,7236,7238,7240,7242,7244,7246,7248,7250,7252,7254,7256,7258,7260,7262,7264,
+			7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,
+			7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7372,7374,7376,7378,7380,7382,7384,7386,7388,7390,7392,
+			7394,7396,7398,7400,7402,7404,7406,7408,7410,7412,7414,7416,7418,7420,7422,7424,7426,7428,7430,7432,7434,7436,7438,7440,7442,7444,7446,7448,7450,7452,7454,7456,
+			7458,7460,7462,7464,7466,7468,7470,7472,7474,7476,7478,7480,7482,7484,7486,7488,7490,7492,7494,7496,7498,7500,7502,7504,7506,7508,7510,7512,7514,7516,7518,7520,
+			7522,7524,7526,7528,7530,7532,7534,7536,7538,7540,7542,7544,7546,7548,7550,7552,7554,7556,7558,7560,7562,7564,7566,7568,7570,7572,7574,7576,7578,7580,7582,7584,
+			7586,7588,7590,7592,7594,7596,7598,7600,7602,7604,7606,7608,7610,7612,7614,7616,7618,7620,7622,7624,7626,7628,7630,7632,7634,7636,7638,7640,7642,7644,7646,7648,
+			7650,7652,7654,7656,7658,7660,7662,7664,7666,7668,7670,7672,7674,7676,7678,7680,7682,7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,
+			7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,
+			7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,7816,7818,7820,7822,7824,7826,7828,7830,7832,7834,7836,7838,7840,
+			7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,
+			7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,7936,7938,7940,7942,7944,7946,7948,7950,7952,7954,7956,7958,7960,7962,7964,7966,7968,
+			7970,7972,7974,7976,7978,7980,7982,7984,7986,7988,7990,7992,7994,7996,7998,8000,8002,8004,8006,8008,8010,8012,8014,8016,8018,8020,8022,8024,8026,8028,8030,8032,
+			8034,8036,8038,8040,8042,8044,8046,8048,8050,8052,8054,8056,8058,8060,8062,8064,8066,8068,8070,8072,8074,8076,8078,8080,8082,8084,8086,8088,8090,8092,8094,8096,
+			8098,8100,8102,8104,8106,8108,8110,8112,8114,8116,8118,8120,8122,8124,8126,8128,8130,8132,8134,8136,8138,8140,8142,8144,8146,8148,8150,8152,8154,8156,8158
+		},
+		{
+			8129,8127,8125,8123,8121,8119,8117,8115,8113,8111,8109,8107,8105,8103,8101,8099,8097,8095,8093,8091,8089,8087,8085,8083,8081,8079,8077,8075,8073,8071,8069,8067,
+			8065,8063,8061,8059,8057,8055,8053,8051,8049,8047,8045,8043,8041,8039,8037,8035,8033,8031,8029,8027,8025,8023,8021,8019,8017,8015,8013,8011,8009,8007,8005,8003,
+			8001,7999,7997,7995,7993,7991,7989,7987,7985,7983,7981,7979,7977,7975,7973,7971,7969,7967,7965,7963,7961,7959,7957,7955,7953,7951,7949,7947,7945,7943,7941,7939,
+			7937,7935,7933,7931,7929,7927,7925,7923,7921,7919,7917,7915,7913,7911,7909,7907,7905,7903,7901,7899,7897,7895,7893,7891,7889,7887,7885,7883,7881,7879,7877,7875,
+			7873,7871,7869,7867,7865,7863,7861,7859,7857,7855,7853,7851,7849,7847,7845,7843,7841,7839,7837,7835,7833,7831,7829,7827,7825,7823,7821,7819,7817,7815,7813,7811,
+			7809,7807,7805,7803,7801,7799,7797,7795,7793,7791,7789,7787,7785,7783,7781,7779,7777,7775,7773,7771,7769,7767,7765,7763,7761,7759,7757,7755,7753,7751,7749,7747,
+			7745,7743,7741,7739,7737,7735,7733,7731,7729,7727,7725,7723,7721,7719,7717,7715,7713,7711,7709,7707,7705,7703,7701,7699,7697,7695,7693,7691,7689,7687,7685,7683,
+			7681,7679,7677,7675,7673,7671,7669,7667,7665,7663,7661,7659,7657,7655,7653,7651,7649,7647,7645,7643,7641,7639,7637,7635,7633,7631,7629,7627,7625,7623,7621,7619,
+			7617,7615,7613,7611,7609,7607,7605,7603,7601,7599,7597,7595,7593,7591,7589,7587,7585,7583,7581,7579,7577,7575,7573,7571,7569,7567,7565,7563,7561,7559,7557,7555,
+			7553,7551,7549,7547,7545,7543,7541,7539,7537,7535,7533,7531,7529,7527,7525,7523,7521,7519,7517,7515,7513,7511,7509,7507,7505,7503,7501,7499,7497,7495,7493,7491,
+			7489,7487,7485,7483,7481,7479,7477,7475,7473,7471,7469,7467,7465,7463,7461,7459,7457,7455,7453,7451,7449,7447,7445,7443,7441,7439,7437,7435,7433,7431,7429,7427,
+			7425,7423,7421,7419,7417,7415,7413,7411,7409,7407,7405,7403,7401,7399,7397,7395,7393,7391,7389,7387,7385,7383,7381,7379,7377,7375,7373,7371,7369,7367,7365,7363,
+			7361,7359,7357,7355,7353,7351,7349,7347,7345,7343,7341,7339,7337,7335,7333,7331,7329,7327,7325,7323,7321,7319,7317,7315,7313,7311,7309,7307,7305,7303,7301,7299,
+			7297,7295,7293,7291,7289,7287,7285,7283,7281,7279,7277,7275,7273,7271,7269,7267,7265,7263,7261,7259,7257,7255,7253,7251,7249,7247,7245,7243,7241,7239,7237,7235,
+			7233,7231,7229,7227,7225,7223,7221,7219,7217,7215,7213,7211,7209,7207,7205,7203,7201,7199,7197,7195,7193,7191,7189,7187,7185,7183,7181,7179,7177,7175,7173,7171,
+			7169,7167,7165,7163,7161,7159,7157,7155,7153,7151,7149,7147,7145,7143,7141,7139,7137,7135,7133,7131,7129,7127,7125,7123,7121,7119,7117,7115,7113,7111,7109,7107,
+			7105,7103,7101,7099,7097,7095,7093,7091,7089,7087,7085,7083,7081,7079,7077,7075,7073,7071,7069,7067,7065,7063,7061,7059,7057,7055,7053,7051,7049,7047,7045,7043,
+			7041,7039,7037,7035,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,7007,7005,7003,7001,6999,6997,6995,6993,6991,6989,6987,6985,6983,6981,6979,
+			6977,6975,6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,6947,6945,6943,6941,6939,6937,6935,6933,6931,6929,6927,6925,6923,6921,6919,6917,6915,
+			6913,6911,6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,6887,6885,6883,6881,6879,6877,6875,6873,6871,6869,6867,6865,6863,6861,6859,6857,6855,6853,6851,
+			6849,6847,6845,6843,6841,6839,6837,6835,6833,6831,6829,6827,6825,6823,6821,6819,6817,6815,6813,6811,6809,6807,6805,6803,6801,6799,6797,6795,6793,6791,6789,6787,
+			6785,6783,6781,6779,6777,6775,6773,6771,6769,6767,6765,6763,6761,6759,6757,6755,6753,6751,6749,6747,6745,6743,6741,6739,6737,6735,6733,6731,6729,6727,6725,6723,
+			6721,6719,6717,6715,6713,6711,6709,6707,6705,6703,6701,6699,6697,6695,6693,6691,6689,6687,6685,6683,6681,6679,6677,6675,6673,6671,6669,6667,6665,6663,6661,6659,
+			6657,6655,6653,6651,6649,6647,6645,6643,6641,6639,6637,6635,6633,6631,6629,6627,6625,6623,6621,6619,6617,6615,6613,6611,6609,6607,6605,6603,6601,6599,6597,6595,
+			6593,6591,6589,6587,6585,6583,6581,6579,6577,6575,6573,6571,6569,6567,6565,6563,6561,6559,6557,6555,6553,6551,6549,6547,6545,6543,6541,6539,6537,6535,6533,6531,
+			6529,6527,6525,6523,6521,6519,6517,6515,6513,6511,6509,6507,6505,6503,6501,6499,6497,6495,6493,6491,6489,6487,6485,6483,6481,6479,6477,6475,6473,6471,6469,6467,
+			6465,6463,6461,6459,6457,6455,6453,6451,6449,6447,6445,6443,6441,6439,6437,6435,6433,6431,6429,6427,6425,6423,6421,6419,6417,6415,6413,6411,6409,6407,6405,6403,
+			6401,6399,6397,6395,6393,6391,6389,6387,6385,6383,6381,6379,6377,6375,6373,6371,6369,6367,6365,6363,6361,6359,6357,6355,6353,6351,6349,6347,6345,6343,6341,6339,
+			6337,6335,6333,6331,6329,6327,6325,6323,6321,6319,6317,6315,6313,6311,6309,6307,6305,6303,6301,6299,6297,6295,6293,6291,6289,6287,6285,6283,6281,6279,6277,6275,
+			6273,6271,6269,6267,6265,6263,6261,6259,6257,6255,6253,6251,6249,6247,6245,6243,6241,6239,6237,6235,6233,6231,6229,6227,6225,6223,6221,6219,6217,6215,6213,6211,
+			6209,6207,6205,6203,6201,6199,6197,6195,6193,6191,6189,6187,6185,6183,6181,6179,6177,6175,6173,6171,6169,6167,6165,6163,6161,6159,6157,6155,6153,6151,6149,6147,
+			6145,6143,6141,6139,6137,6135,6133,6131,6129,6127,6125,6123,6121,6119,6117,6115,6113,6111,6109,6107,6105,6103,6101,6099,6097,6095,6093,6091,6089,6087,6085,6083,
+			6081,6079,6077,6075,6073,6071,6069,6067,6065,6063,6061,6059,6057,6055,6053,6051,6049,6047,6045,6043,6041,6039,6037,6035,6033,6031,6029,6027,6025,6023,6021,6019,
+			6017,6015,6013,6011,6009,6007,6005,6003,6001,5999,5997,5995,5993,5991,5989,5987,5985,5983,5981,5979,5977,5975,5973,5971,5969,5967,5965,5963,5961,5959,5957,5955,
+			5953,5951,5949,5947,5945,5943,5941,5939,5937,5935,5933,5931,5929,5927,5925,5923,5921,5919,5917,5915,5913,5911,5909,5907,5905,5903,5901,5899,5897,5895,5893,5891,
+			5889,5887,5885,5883,5881,5879,5877,5875,5873,5871,5869,5867,5865,5863,5861,5859,5857,5855,5853,5851,5849,5847,5845,5843,5841,5839,5837,5835,5833,5831,5829,5827,
+			5825,5823,5821,5819,5817,5815,5813,5811,5809,5807,5805,5803,5801,5799,5797,5795,5793,5791,5789,5787,5785,5783,5781,5779,5777,5775,5773,5771,5769,5767,5765,5763,
+			5761,5759,5757,5755,5753,5751,5749,5747,5745,5743,5741,5739,5737,5735,5733,5731,5729,5727,5725,5723,5721,5719,5717,5715,5713,5711,5709,5707,5705,5703,5701,5699,
+			5697,5695,5693,5691,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,5663,5661,5659,5657,5655,5653,5651,5649,5647,5645,5643,5641,5639,5637,5635,
+			5633,5631,5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,5599,5597,5595,5593,5591,5589,5587,5585,5583,5581,5579,5577,5575,5573,5571,
+			5569,5567,5565,5563,5561,5559,5557,5555,5553,5551,5549,5547,5545,5543,5541,5539,5537,5535,5533,5531,5529,5527,5525,5523,5521,5519,5517,5515,5513,5511,5509,5507,
+			5505,5503,5501,5499,5497,5495,5493,5491,5489,5487,5485,5483,5481,5479,5477,5475,5473,5471,5469,5467,5465,5463,5461,5459,5457,5455,5453,5451,5449,5447,5445,5443,
+			5441,5439,5437,5435,5433,5431,5429,5427,5425,5423,5421,5419,5417,5415,5413,5411,5409,5407,5405,5403,5401,5399,5397,5395,5393,5391,5389,5387,5385,5383,5381,5379,
+			5377,5375,5373,5371,5369,5367,5365,5363,5361,5359,5357,5355,5353,5351,5349,5347,5345,5343,5341,5339,5337,5335,5333,5331,5329,5327,5325,5323,5321,5319,5317,5315,
+			5313,5311,5309,5307,5305,5303,5301,5299,5297,5295,5293,5291,5289,5287,5285,5283,5281,5279,5277,5275,5273,5271,5269,5267,5265,5263,5261,5259,5257,5255,5253,5251,
+			5249,5247,5245,5243,5241,5239,5237,5235,5233,5231,5229,5227,5225,5223,5221,5219,5217,5215,5213,5211,5209,5207,5205,5203,5201,5199,5197,5195,5193,5191,5189,5187,
+			5185,5183,5181,5179,5177,5175,5173,5171,5169,5167,5165,5163,5161,5159,5157,5155,5153,5151,5149,5147,5145,5143,5141,5139,5137,5135,5133,5131,5129,5127,5125,5123,
+			5121,5119,5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,5093,5091,5089,5087,5085,5083,5081,5079,5077,5075,5073,5071,5069,5067,5065,5063,5061,5059,
+			5057,5055,5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,5033,5031,5029,5027,5025,5023,5021,5019,5017,5015,5013,5011,5009,5007,5005,5003,5001,4999,4997,4995,
+			4993,4991,4989,4987,4985,4983,4981,4979,4977,4975,4973,4971,4969,4967,4965,4963,4961,4959,4957,4955,4953,4951,4949,4947,4945,4943,4941,4939,4937,4935,4933,4931,
+			4929,4927,4925,4923,4921,4919,4917,4915,4913,4911,4909,4907,4905,4903,4901,4899,4897,4895,4893,4891,4889,4887,4885,4883,4881,4879,4877,4875,4873,4871,4869,4867,
+			4865,4863,4861,4859,4857,4855,4853,4851,4849,4847,4845,4843,4841,4839,4837,4835,4833,4831,4829,4827,4825,4823,4821,4819,4817,4815,4813,4811,4809,4807,4805,4803,
+			4801,4799,4797,4795,4793,4791,4789,4787,4785,4783,4781,4779,4777,4775,4773,4771,4769,4767,4765,4763,4761,4759,4757,4755,4753,4751,4749,4747,4745,4743,4741,4739,
+			4737,4735,4733,4731,4729,4727,4725,4723,4721,4719,4717,4715,4713,4711,4709,4707,4705,4703,4701,4699,4697,4695,4693,4691,4689,4687,4685,4683,4681,4679,4677,4675,
+			4673,4671,4669,4667,4665,4663,4661,4659,4657,4655,4653,4651,4649,4647,4645,4643,4641,4639,4637,4635,4633,4631,4629,4627,4625,4623,4621,4619,4617,4615,4613,4611,
+			4609,4607,4605,4603,4601,4599,4597,4595,4593,4591,4589,4587,4585,4583,4581,4579,4577,4575,4573,4571,4569,4567,4565,4563,4561,4559,4557,4555,4553,4551,4549,4547,
+			4545,4543,4541,4539,4537,4535,4533,4531,4529,4527,4525,4523,4521,4519,4517,4515,4513,4511,4509,4507,4505,4503,4501,4499,4497,4495,4493,4491,4489,4487,4485,4483,
+			4481,4479,4477,4475,4473,4471,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,4447,4445,4443,4441,4439,4437,4435,4433,4431,4429,4427,4425,4423,4421,4419,
+			4417,4415,4413,4411,4409,4407,4405,4403,4401,4399,4397,4395,4393,4391,4389,4387,4385,4383,4381,4379,4377,4375,4373,4371,4369,4367,4365,4363,4361,4359,4357,4355,
+			4353,4351,4349,4347,4345,4343,4341,4339,4337,4335,4333,4331,4329,4327,4325,4323,4321,4319,4317,4315,4313,4311,4309,4307,4305,4303,4301,4299,4297,4295,4293,4291,
+			4289,4287,4285,4283,4281,4279,4277,4275,4273,4271,4269,4267,4265,4263,4261,4259,4257,4255,4253,4251,4249,4247,4245,4243,4241,4239,4237,4235,4233,4231,4229,4227,
+			4225,4223,4221,4219,4217,4215,4213,4211,4209,4207,4205,4203,4201,4199,4197,4195,4193,4191,4189,4187,4185,4183,4181,4179,4177,4175,4173,4171,4169,4167,4165,4163,
+			4161,4159,4157,4155,4153,4151,4149,4147,4145,4143,4141,4139,4137,4135,4133,4131,4129,4127,4125,4123,4121,4119,4117,4115,4113,4111,4109,4107,4105,4103,4101,4099,
+			4097,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,7,5,6,
+			4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4,6,4096,4098,
+			4100,4102,4104,4106,4108,4110,4112,4114,4116,4118,4120,4122,4124,4126,4128,4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,4160,4162,
+			4164,4166,4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,4192,4194,4196,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226,
+			4228,4230,4232,4234,4236,4238,4240,4242,4244,4246,4248,4250,4252,4254,4256,4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,4288,4290,
+			4292,4294,4296,4298,4300,4302,4304,4306,4308,4310,4312,4314,4316,4318,4320,4322,4324,4326,4328,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,4352,4354,
+			4356,4358,4360,4362,4364,4366,4368,4370,4372,4374,4376,4378,4380,4382,4384,4386,4388,4390,4392,4394,4396,4398,4400,4402,4404,4406,4408,4410,4412,4414,4416,4418,
+			4420,4422,4424,4426,4428,4430,4432,4434,4436,4438,4440,4442,4444,4446,4448,4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472,4474,4476,4478,4480,4482,
+			4484,4486,4488,4490,4492,4494,4496,4498,4500,4502,4504,4506,4508,4510,4512,4514,4516,4518,4520,4522,4524,4526,4528,4530,4532,4534,4536,4538,4540,4542,4544,4546,
+			4548,4550,4552,4554,4556,4558,4560,4562,4564,4566,4568,4570,4572,4574,4576,4578,4580,4582,4584,4586,4588,4590,4592,4594,4596,4598,4600,4602,4604,4606,4608,4610,
+			4612,4614,4616,4618,4620,4622,4624,4626,4628,4630,4632,4634,4636,4638,4640,4642,4644,4646,4648,4650,4652,4654,4656,4658,4660,4662,4664,4666,4668,4670,4672,4674,
+			4676,4678,4680,4682,4684,4686,4688,4690,4692,4694,4696,4698,4700,4702,4704,4706,4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,
+			4740,4742,4744,4746,4748,4750,4752,4754,4756,4758,4760,4762,4764,4766,4768,4770,4772,4774,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,4800,4802,
+			4804,4806,4808,4810,4812,4814,4816,4818,4820,4822,4824,4826,4828,4830,4832,4834,4836,4838,4840,4842,4844,4846,4848,4850,4852,4854,4856,4858,4860,4862,4864,4866,
+			4868,4870,4872,4874,4876,4878,4880,4882,4884,4886,4888,4890,4892,4894,4896,4898,4900,4902,4904,4906,4908,4910,4912,4914,4916,4918,4920,4922,4924,4926,4928,4930,
+			4932,4934,4936,4938,4940,4942,4944,4946,4948,4950,4952,4954,4956,4958,4960,4962,4964,4966,4968,4970,4972,4974,4976,4978,4980,4982,4984,4986,4988,4990,4992,4994,
+			4996,4998,5000,5002,5004,5006,5008,5010,5012,5014,5016,5018,5020,5022,5024,5026,5028,5030,5032,5034,5036,5038,5040,5042,5044,5046,5048,5050,5052,5054,5056,5058,
+			5060,5062,5064,5066,5068,5070,5072,5074,5076,5078,5080,5082,5084,5086,5088,5090,5092,5094,5096,5098,5100,5102,5104,5106,5108,5110,5112,5114,5116,5118,5120,5122,
+			5124,5126,5128,5130,5132,5134,5136,5138,5140,5142,5144,5146,5148,5150,5152,5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5176,5178,5180,5182,5184,5186,
+			5188,5190,5192,5194,5196,5198,5200,5202,5204,5206,5208,5210,5212,5214,5216,5218,5220,5222,5224,5226,5228,5230,5232,5234,5236,5238,5240,5242,5244,5246,5248,5250,
+			5252,5254,5256,5258,5260,5262,5264,5266,5268,5270,5272,5274,5276,5278,5280,5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,
+			5316,5318,5320,5322,5324,5326,5328,5330,5332,5334,5336,5338,5340,5342,5344,5346,5348,5350,5352,5354,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,5376,5378,
+			5380,5382,5384,5386,5388,5390,5392,5394,5396,5398,5400,5402,5404,5406,5408,5410,5412,5414,5416,5418,5420,5422,5424,5426,5428,5430,5432,5434,5436,5438,5440,5442,
+			5444,5446,5448,5450,5452,5454,5456,5458,5460,5462,5464,5466,5468,5470,5472,5474,5476,5478,5480,5482,5484,5486,5488,5490,5492,5494,5496,5498,5500,5502,5504,5506,
+			5508,5510,5512,5514,5516,5518,5520,5522,5524,5526,5528,5530,5532,5534,5536,5538,5540,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5566,5568,5570,
+			5572,5574,5576,5578,5580,5582,5584,5586,5588,5590,5592,5594,5596,5598,5600,5602,5604,5606,5608,5610,5612,5614,5616,5618,5620,5622,5624,5626,5628,5630,5632,5634,
+			5636,5638,5640,5642,5644,5646,5648,5650,5652,5654,5656,5658,5660,5662,5664,5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,5696,5698,
+			5700,5702,5704,5706,5708,5710,5712,5714,5716,5718,5720,5722,5724,5726,5728,5730,5732,5734,5736,5738,5740,5742,5744,5746,5748,5750,5752,5754,5756,5758,5760,5762,
+			5764,5766,5768,5770,5772,5774,5776,5778,5780,5782,5784,5786,5788,5790,5792,5794,5796,5798,5800,5802,5804,5806,5808,5810,5812,5814,5816,5818,5820,5822,5824,5826,
+			5828,5830,5832,5834,5836,5838,5840,5842,5844,5846,5848,5850,5852,5854,5856,5858,5860,5862,5864,5866,5868,5870,5872,5874,5876,5878,5880,5882,5884,5886,5888,5890,
+			5892,5894,5896,5898,5900,5902,5904,5906,5908,5910,5912,5914,5916,5918,5920,5922,5924,5926,5928,5930,5932,5934,5936,5938,5940,5942,5944,5946,5948,5950,5952,5954,
+			5956,5958,5960,5962,5964,5966,5968,5970,5972,5974,5976,5978,5980,5982,5984,5986,5988,5990,5992,5994,5996,5998,6000,6002,6004,6006,6008,6010,6012,6014,6016,6018,
+			6020,6022,6024,6026,6028,6030,6032,6034,6036,6038,6040,6042,6044,6046,6048,6050,6052,6054,6056,6058,6060,6062,6064,6066,6068,6070,6072,6074,6076,6078,6080,6082,
+			6084,6086,6088,6090,6092,6094,6096,6098,6100,6102,6104,6106,6108,6110,6112,6114,6116,6118,6120,6122,6124,6126,6128,6130,6132,6134,6136,6138,6140,6142,6144,6146,
+			6148,6150,6152,6154,6156,6158,6160,6162,6164,6166,6168,6170,6172,6174,6176,6178,6180,6182,6184,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204,6206,6208,6210,
+			6212,6214,6216,6218,6220,6222,6224,6226,6228,6230,6232,6234,6236,6238,6240,6242,6244,6246,6248,6250,6252,6254,6256,6258,6260,6262,6264,6266,6268,6270,6272,6274,
+			6276,6278,6280,6282,6284,6286,6288,6290,6292,6294,6296,6298,6300,6302,6304,6306,6308,6310,6312,6314,6316,6318,6320,6322,6324,6326,6328,6330,6332,6334,6336,6338,
+			6340,6342,6344,6346,6348,6350,6352,6354,6356,6358,6360,6362,6364,6366,6368,6370,6372,6374,6376,6378,6380,6382,6384,6386,6388,6390,6392,6394,6396,6398,6400,6402,
+			6404,6406,6408,6410,6412,6414,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6440,6442,6444,6446,6448,6450,6452,6454,6456,6458,6460,6462,6464,6466,
+			6468,6470,6472,6474,6476,6478,6480,6482,6484,6486,6488,6490,6492,6494,6496,6498,6500,6502,6504,6506,6508,6510,6512,6514,6516,6518,6520,6522,6524,6526,6528,6530,
+			6532,6534,6536,6538,6540,6542,6544,6546,6548,6550,6552,6554,6556,6558,6560,6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,6582,6584,6586,6588,6590,6592,6594,
+			6596,6598,6600,6602,6604,6606,6608,6610,6612,6614,6616,6618,6620,6622,6624,6626,6628,6630,6632,6634,6636,6638,6640,6642,6644,6646,6648,6650,6652,6654,6656,6658,
+			6660,6662,6664,6666,6668,6670,6672,6674,6676,6678,6680,6682,6684,6686,6688,6690,6692,6694,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716,6718,6720,6722,
+			6724,6726,6728,6730,6732,6734,6736,6738,6740,6742,6744,6746,6748,6750,6752,6754,6756,6758,6760,6762,6764,6766,6768,6770,6772,6774,6776,6778,6780,6782,6784,6786,
+			6788,6790,6792,6794,6796,6798,6800,6802,6804,6806,6808,6810,6812,6814,6816,6818,6820,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840,6842,6844,6846,6848,6850,
+			6852,6854,6856,6858,6860,6862,6864,6866,6868,6870,6872,6874,6876,6878,6880,6882,6884,6886,6888,6890,6892,6894,6896,6898,6900,6902,6904,6906,6908,6910,6912,6914,
+			6916,6918,6920,6922,6924,6926,6928,6930,6932,6934,6936,6938,6940,6942,6944,6946,6948,6950,6952,6954,6956,6958,6960,6962,6964,6966,6968,6970,6972,6974,6976,6978,
+			6980,6982,6984,6986,6988,6990,6992,6994,6996,6998,7000,7002,7004,7006,7008,7010,7012,7014,7016,7018,7020,7022,7024,7026,7028,7030,7032,7034,7036,7038,7040,7042,
+			7044,7046,7048,7050,7052,7054,7056,7058,7060,7062,7064,7066,7068,7070,7072,7074,7076,7078,7080,7082,7084,7086,7088,7090,7092,7094,7096,7098,7100,7102,7104,7106,
+			7108,7110,7112,7114,7116,7118,7120,7122,7124,7126,7128,7130,7132,7134,7136,7138,7140,7142,7144,7146,7148,7150,7152,7154,7156,7158,7160,7162,7164,7166,7168,7170,
+			7172,7174,7176,7178,7180,7182,7184,7186,7188,7190,7192,7194,7196,7198,7200,7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,7228,7230,7232,7234,
+			7236,7238,7240,7242,7244,7246,7248,7250,7252,7254,7256,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,
+			7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,
+			7364,7366,7368,7370,7372,7374,7376,7378,7380,7382,7384,7386,7388,7390,7392,7394,7396,7398,7400,7402,7404,7406,7408,7410,7412,7414,7416,7418,7420,7422,7424,7426,
+			7428,7430,7432,7434,7436,7438,7440,7442,7444,7446,7448,7450,7452,7454,7456,7458,7460,7462,7464,7466,7468,7470,7472,7474,7476,7478,7480,7482,7484,7486,7488,7490,
+			7492,7494,7496,7498,7500,7502,7504,7506,7508,7510,7512,7514,7516,7518,7520,7522,7524,7526,7528,7530,7532,7534,7536,7538,7540,7542,7544,7546,7548,7550,7552,7554,
+			7556,7558,7560,7562,7564,7566,7568,7570,7572,7574,7576,7578,7580,7582,7584,7586,7588,7590,7592,7594,7596,7598,7600,7602,7604,7606,7608,7610,7612,7614,7616,7618,
+			7620,7622,7624,7626,7628,7630,7632,7634,7636,7638,7640,7642,7644,7646,7648,7650,7652,7654,7656,7658,7660,7662,7664,7666,7668,7670,7672,7674,7676,7678,7680,7682,
+			7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,
+			7748,7750,7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,
+			7812,7814,7816,7818,7820,7822,7824,7826,7828,7830,7832,7834,7836,7838,7840,7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,
+			7876,7878,7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,7936,7938,
+			7940,7942,7944,7946,7948,7950,7952,7954,7956,7958,7960,7962,7964,7966,7968,7970,7972,7974,7976,7978,7980,7982,7984,7986,7988,7990,7992,7994,7996,7998,8000,8002,
+			8004,8006,8008,8010,8012,8014,8016,8018,8020,8022,8024,8026,8028,8030,8032,8034,8036,8038,8040,8042,8044,8046,8048,8050,8052,8054,8056,8058,8060,8062,8064,8066,
+			8068,8070,8072,8074,8076,8078,8080,8082,8084,8086,8088,8090,8092,8094,8096,8098,8100,8102,8104,8106,8108,8110,8112,8114,8116,8118,8120,8122,8124,8126,8128
+		},
+		{
+			8069,8067,8065,8063,8061,8059,8057,8055,8053,8051,8049,8047,8045,8043,8041,8039,8037,8035,8033,8031,8029,8027,8025,8023,8021,8019,8017,8015,8013,8011,8009,8007,
+			8005,8003,8001,7999,7997,7995,7993,7991,7989,7987,7985,7983,7981,7979,7977,7975,7973,7971,7969,7967,7965,7963,7961,7959,7957,7955,7953,7951,7949,7947,7945,7943,
+			7941,7939,7937,7935,7933,7931,7929,7927,7925,7923,7921,7919,7917,7915,7913,7911,7909,7907,7905,7903,7901,7899,7897,7895,7893,7891,7889,7887,7885,7883,7881,7879,
+			7877,7875,7873,7871,7869,7867,7865,7863,7861,7859,7857,7855,7853,7851,7849,7847,7845,7843,7841,7839,7837,7835,7833,7831,7829,7827,7825,7823,7821,7819,7817,7815,
+			7813,7811,7809,7807,7805,7803,7801,7799,7797,7795,7793,7791,7789,7787,7785,7783,7781,7779,7777,7775,7773,7771,7769,7767,7765,7763,7761,7759,7757,7755,7753,7751,
+			7749,7747,7745,7743,7741,7739,7737,7735,7733,7731,7729,7727,7725,7723,7721,7719,7717,7715,7713,7711,7709,7707,7705,7703,7701,7699,7697,7695,7693,7691,7689,7687,
+			7685,7683,7681,7679,7677,7675,7673,7671,7669,7667,7665,7663,7661,7659,7657,7655,7653,7651,7649,7647,7645,7643,7641,7639,7637,7635,7633,7631,7629,7627,7625,7623,
+			7621,7619,7617,7615,7613,7611,7609,7607,7605,7603,7601,7599,7597,7595,7593,7591,7589,7587,7585,7583,7581,7579,7577,7575,7573,7571,7569,7567,7565,7563,7561,7559,
+			7557,7555,7553,7551,7549,7547,7545,7543,7541,7539,7537,7535,7533,7531,7529,7527,7525,7523,7521,7519,7517,7515,7513,7511,7509,7507,7505,7503,7501,7499,7497,7495,
+			7493,7491,7489,7487,7485,7483,7481,7479,7477,7475,7473,7471,7469,7467,7465,7463,7461,7459,7457,7455,7453,7451,7449,7447,7445,7443,7441,7439,7437,7435,7433,7431,
+			7429,7427,7425,7423,7421,7419,7417,7415,7413,7411,7409,7407,7405,7403,7401,7399,7397,7395,7393,7391,7389,7387,7385,7383,7381,7379,7377,7375,7373,7371,7369,7367,
+			7365,7363,7361,7359,7357,7355,7353,7351,7349,7347,7345,7343,7341,7339,7337,7335,7333,7331,7329,7327,7325,7323,7321,7319,7317,7315,7313,7311,7309,7307,7305,7303,
+			7301,7299,7297,7295,7293,7291,7289,7287,7285,7283,7281,7279,7277,7275,7273,7271,7269,7267,7265,7263,7261,7259,7257,7255,7253,7251,7249,7247,7245,7243,7241,7239,
+			7237,7235,7233,7231,7229,7227,7225,7223,7221,7219,7217,7215,7213,7211,7209,7207,7205,7203,7201,7199,7197,7195,7193,7191,7189,7187,7185,7183,7181,7179,7177,7175,
+			7173,7171,7169,7167,7165,7163,7161,7159,7157,7155,7153,7151,7149,7147,7145,7143,7141,7139,7137,7135,7133,7131,7129,7127,7125,7123,7121,7119,7117,7115,7113,7111,
+			7109,7107,7105,7103,7101,7099,7097,7095,7093,7091,7089,7087,7085,7083,7081,7079,7077,7075,7073,7071,7069,7067,7065,7063,7061,7059,7057,7055,7053,7051,7049,7047,
+			7045,7043,7041,7039,7037,7035,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,7007,7005,7003,7001,6999,6997,6995,6993,6991,6989,6987,6985,6983,
+			6981,6979,6977,6975,6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,6947,6945,6943,6941,6939,6937,6935,6933,6931,6929,6927,6925,6923,6921,6919,
+			6917,6915,6913,6911,6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,6887,6885,6883,6881,6879,6877,6875,6873,6871,6869,6867,6865,6863,6861,6859,6857,6855,
+			6853,6851,6849,6847,6845,6843,6841,6839,6837,6835,6833,6831,6829,6827,6825,6823,6821,6819,6817,6815,6813,6811,6809,6807,6805,6803,6801,6799,6797,6795,6793,6791,
+			6789,6787,6785,6783,6781,6779,6777,6775,6773,6771,6769,6767,6765,6763,6761,6759,6757,6755,6753,6751,6749,6747,6745,6743,6741,6739,6737,6735,6733,6731,6729,6727,
+			6725,6723,6721,6719,6717,6715,6713,6711,6709,6707,6705,6703,6701,6699,6697,6695,6693,6691,6689,6687,6685,6683,6681,6679,6677,6675,6673,6671,6669,6667,6665,6663,
+			6661,6659,6657,6655,6653,6651,6649,6647,6645,6643,6641,6639,6637,6635,6633,6631,6629,6627,6625,6623,6621,6619,6617,6615,6613,6611,6609,6607,6605,6603,6601,6599,
+			6597,6595,6593,6591,6589,6587,6585,6583,6581,6579,6577,6575,6573,6571,6569,6567,6565,6563,6561,6559,6557,6555,6553,6551,6549,6547,6545,6543,6541,6539,6537,6535,
+			6533,6531,6529,6527,6525,6523,6521,6519,6517,6515,6513,6511,6509,6507,6505,6503,6501,6499,6497,6495,6493,6491,6489,6487,6485,6483,6481,6479,6477,6475,6473,6471,
+			6469,6467,6465,6463,6461,6459,6457,6455,6453,6451,6449,6447,6445,6443,6441,6439,6437,6435,6433,6431,6429,6427,6425,6423,6421,6419,6417,6415,6413,6411,6409,6407,
+			6405,6403,6401,6399,6397,6395,6393,6391,6389,6387,6385,6383,6381,6379,6377,6375,6373,6371,6369,6367,6365,6363,6361,6359,6357,6355,6353,6351,6349,6347,6345,6343,
+			6341,6339,6337,6335,6333,6331,6329,6327,6325,6323,6321,6319,6317,6315,6313,6311,6309,6307,6305,6303,6301,6299,6297,6295,6293,6291,6289,6287,6285,6283,6281,6279,
+			6277,6275,6273,6271,6269,6267,6265,6263,6261,6259,6257,6255,6253,6251,6249,6247,6245,6243,6241,6239,6237,6235,6233,6231,6229,6227,6225,6223,6221,6219,6217,6215,
+			6213,6211,6209,6207,6205,6203,6201,6199,6197,6195,6193,6191,6189,6187,6185,6183,6181,6179,6177,6175,6173,6171,6169,6167,6165,6163,6161,6159,6157,6155,6153,6151,
+			6149,6147,6145,6143,6141,6139,6137,6135,6133,6131,6129,6127,6125,6123,6121,6119,6117,6115,6113,6111,6109,6107,6105,6103,6101,6099,6097,6095,6093,6091,6089,6087,
+			6085,6083,6081,6079,6077,6075,6073,6071,6069,6067,6065,6063,6061,6059,6057,6055,6053,6051,6049,6047,6045,6043,6041,6039,6037,6035,6033,6031,6029,6027,6025,6023,
+			6021,6019,6017,6015,6013,6011,6009,6007,6005,6003,6001,5999,5997,5995,5993,5991,5989,5987,5985,5983,5981,5979,5977,5975,5973,5971,5969,5967,5965,5963,5961,5959,
+			5957,5955,5953,5951,5949,5947,5945,5943,5941,5939,5937,5935,5933,5931,5929,5927,5925,5923,5921,5919,5917,5915,5913,5911,5909,5907,5905,5903,5901,5899,5897,5895,
+			5893,5891,5889,5887,5885,5883,5881,5879,5877,5875,5873,5871,5869,5867,5865,5863,5861,5859,5857,5855,5853,5851,5849,5847,5845,5843,5841,5839,5837,5835,5833,5831,
+			5829,5827,5825,5823,5821,5819,5817,5815,5813,5811,5809,5807,5805,5803,5801,5799,5797,5795,5793,5791,5789,5787,5785,5783,5781,5779,5777,5775,5773,5771,5769,5767,
+			5765,5763,5761,5759,5757,5755,5753,5751,5749,5747,5745,5743,5741,5739,5737,5735,5733,5731,5729,5727,5725,5723,5721,5719,5717,5715,5713,5711,5709,5707,5705,5703,
+			5701,5699,5697,5695,5693,5691,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,5663,5661,5659,5657,5655,5653,5651,5649,5647,5645,5643,5641,5639,
+			5637,5635,5633,5631,5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,5599,5597,5595,5593,5591,5589,5587,5585,5583,5581,5579,5577,5575,
+			5573,5571,5569,5567,5565,5563,5561,5559,5557,5555,5553,5551,5549,5547,5545,5543,5541,5539,5537,5535,5533,5531,5529,5527,5525,5523,5521,5519,5517,5515,5513,5511,
+			5509,5507,5505,5503,5501,5499,5497,5495,5493,5491,5489,5487,5485,5483,5481,5479,5477,5475,5473,5471,5469,5467,5465,5463,5461,5459,5457,5455,5453,5451,5449,5447,
+			5445,5443,5441,5439,5437,5435,5433,5431,5429,5427,5425,5423,5421,5419,5417,5415,5413,5411,5409,5407,5405,5403,5401,5399,5397,5395,5393,5391,5389,5387,5385,5383,
+			5381,5379,5377,5375,5373,5371,5369,5367,5365,5363,5361,5359,5357,5355,5353,5351,5349,5347,5345,5343,5341,5339,5337,5335,5333,5331,5329,5327,5325,5323,5321,5319,
+			5317,5315,5313,5311,5309,5307,5305,5303,5301,5299,5297,5295,5293,5291,5289,5287,5285,5283,5281,5279,5277,5275,5273,5271,5269,5267,5265,5263,5261,5259,5257,5255,
+			5253,5251,5249,5247,5245,5243,5241,5239,5237,5235,5233,5231,5229,5227,5225,5223,5221,5219,5217,5215,5213,5211,5209,5207,5205,5203,5201,5199,5197,5195,5193,5191,
+			5189,5187,5185,5183,5181,5179,5177,5175,5173,5171,5169,5167,5165,5163,5161,5159,5157,5155,5153,5151,5149,5147,5145,5143,5141,5139,5137,5135,5133,5131,5129,5127,
+			5125,5123,5121,5119,5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,5093,5091,5089,5087,5085,5083,5081,5079,5077,5075,5073,5071,5069,5067,5065,5063,
+			5061,5059,5057,5055,5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,5033,5031,5029,5027,5025,5023,5021,5019,5017,5015,5013,5011,5009,5007,5005,5003,5001,4999,
+			4997,4995,4993,4991,4989,4987,4985,4983,4981,4979,4977,4975,4973,4971,4969,4967,4965,4963,4961,4959,4957,4955,4953,4951,4949,4947,4945,4943,4941,4939,4937,4935,
+			4933,4931,4929,4927,4925,4923,4921,4919,4917,4915,4913,4911,4909,4907,4905,4903,4901,4899,4897,4895,4893,4891,4889,4887,4885,4883,4881,4879,4877,4875,4873,4871,
+			4869,4867,4865,4863,4861,4859,4857,4855,4853,4851,4849,4847,4845,4843,4841,4839,4837,4835,4833,4831,4829,4827,4825,4823,4821,4819,4817,4815,4813,4811,4809,4807,
+			4805,4803,4801,4799,4797,4795,4793,4791,4789,4787,4785,4783,4781,4779,4777,4775,4773,4771,4769,4767,4765,4763,4761,4759,4757,4755,4753,4751,4749,4747,4745,4743,
+			4741,4739,4737,4735,4733,4731,4729,4727,4725,4723,4721,4719,4717,4715,4713,4711,4709,4707,4705,4703,4701,4699,4697,4695,4693,4691,4689,4687,4685,4683,4681,4679,
+			4677,4675,4673,4671,4669,4667,4665,4663,4661,4659,4657,4655,4653,4651,4649,4647,4645,4643,4641,4639,4637,4635,4633,4631,4629,4627,4625,4623,4621,4619,4617,4615,
+			4613,4611,4609,4607,4605,4603,4601,4599,4597,4595,4593,4591,4589,4587,4585,4583,4581,4579,4577,4575,4573,4571,4569,4567,4565,4563,4561,4559,4557,4555,4553,4551,
+			4549,4547,4545,4543,4541,4539,4537,4535,4533,4531,4529,4527,4525,4523,4521,4519,4517,4515,4513,4511,4509,4507,4505,4503,4501,4499,4497,4495,4493,4491,4489,4487,
+			4485,4483,4481,4479,4477,4475,4473,4471,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,4447,4445,4443,4441,4439,4437,4435,4433,4431,4429,4427,4425,4423,
+			4421,4419,4417,4415,4413,4411,4409,4407,4405,4403,4401,4399,4397,4395,4393,4391,4389,4387,4385,4383,4381,4379,4377,4375,4373,4371,4369,4367,4365,4363,4361,4359,
+			4357,4355,4353,4351,4349,4347,4345,4343,4341,4339,4337,4335,4333,4331,4329,4327,4325,4323,4321,4319,4317,4315,4313,4311,4309,4307,4305,4303,4301,4299,4297,4295,
+			4293,4291,4289,4287,4285,4283,4281,4279,4277,4275,4273,4271,4269,4267,4265,4263,4261,4259,4257,4255,4253,4251,4249,4247,4245,4243,4241,4239,4237,4235,4233,4231,
+			4229,4227,4225,4223,4221,4219,4217,4215,4213,4211,4209,4207,4205,4203,4201,4199,4197,4195,4193,4191,4189,4187,4185,4183,4181,4179,4177,4175,4173,4171,4169,4167,
+			4165,4163,4161,4159,4157,4155,4153,4151,4149,4147,4145,4143,4141,4139,4137,4135,4133,4131,4129,4127,4125,4123,4121,4119,4117,4115,4113,4111,4109,4107,4105,4103,
+			4101,4099,4097,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,
+			13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,15,13,11,9,14,
+			8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,
+			8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,8,10,12,14,4096,4098,4100,4102,
+			4104,4106,4108,4110,4112,4114,4116,4118,4120,4122,4124,4126,4128,4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,4160,4162,4164,4166,
+			4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,4192,4194,4196,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226,4228,4230,
+			4232,4234,4236,4238,4240,4242,4244,4246,4248,4250,4252,4254,4256,4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,4288,4290,4292,4294,
+			4296,4298,4300,4302,4304,4306,4308,4310,4312,4314,4316,4318,4320,4322,4324,4326,4328,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,4352,4354,4356,4358,
+			4360,4362,4364,4366,4368,4370,4372,4374,4376,4378,4380,4382,4384,4386,4388,4390,4392,4394,4396,4398,4400,4402,4404,4406,4408,4410,4412,4414,4416,4418,4420,4422,
+			4424,4426,4428,4430,4432,4434,4436,4438,4440,4442,4444,4446,4448,4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472,4474,4476,4478,4480,4482,4484,4486,
+			4488,4490,4492,4494,4496,4498,4500,4502,4504,4506,4508,4510,4512,4514,4516,4518,4520,4522,4524,4526,4528,4530,4532,4534,4536,4538,4540,4542,4544,4546,4548,4550,
+			4552,4554,4556,4558,4560,4562,4564,4566,4568,4570,4572,4574,4576,4578,4580,4582,4584,4586,4588,4590,4592,4594,4596,4598,4600,4602,4604,4606,4608,4610,4612,4614,
+			4616,4618,4620,4622,4624,4626,4628,4630,4632,4634,4636,4638,4640,4642,4644,4646,4648,4650,4652,4654,4656,4658,4660,4662,4664,4666,4668,4670,4672,4674,4676,4678,
+			4680,4682,4684,4686,4688,4690,4692,4694,4696,4698,4700,4702,4704,4706,4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,4740,4742,
+			4744,4746,4748,4750,4752,4754,4756,4758,4760,4762,4764,4766,4768,4770,4772,4774,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,4800,4802,4804,4806,
+			4808,4810,4812,4814,4816,4818,4820,4822,4824,4826,4828,4830,4832,4834,4836,4838,4840,4842,4844,4846,4848,4850,4852,4854,4856,4858,4860,4862,4864,4866,4868,4870,
+			4872,4874,4876,4878,4880,4882,4884,4886,4888,4890,4892,4894,4896,4898,4900,4902,4904,4906,4908,4910,4912,4914,4916,4918,4920,4922,4924,4926,4928,4930,4932,4934,
+			4936,4938,4940,4942,4944,4946,4948,4950,4952,4954,4956,4958,4960,4962,4964,4966,4968,4970,4972,4974,4976,4978,4980,4982,4984,4986,4988,4990,4992,4994,4996,4998,
+			5000,5002,5004,5006,5008,5010,5012,5014,5016,5018,5020,5022,5024,5026,5028,5030,5032,5034,5036,5038,5040,5042,5044,5046,5048,5050,5052,5054,5056,5058,5060,5062,
+			5064,5066,5068,5070,5072,5074,5076,5078,5080,5082,5084,5086,5088,5090,5092,5094,5096,5098,5100,5102,5104,5106,5108,5110,5112,5114,5116,5118,5120,5122,5124,5126,
+			5128,5130,5132,5134,5136,5138,5140,5142,5144,5146,5148,5150,5152,5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5176,5178,5180,5182,5184,5186,5188,5190,
+			5192,5194,5196,5198,5200,5202,5204,5206,5208,5210,5212,5214,5216,5218,5220,5222,5224,5226,5228,5230,5232,5234,5236,5238,5240,5242,5244,5246,5248,5250,5252,5254,
+			5256,5258,5260,5262,5264,5266,5268,5270,5272,5274,5276,5278,5280,5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,5316,5318,
+			5320,5322,5324,5326,5328,5330,5332,5334,5336,5338,5340,5342,5344,5346,5348,5350,5352,5354,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,5376,5378,5380,5382,
+			5384,5386,5388,5390,5392,5394,5396,5398,5400,5402,5404,5406,5408,5410,5412,5414,5416,5418,5420,5422,5424,5426,5428,5430,5432,5434,5436,5438,5440,5442,5444,5446,
+			5448,5450,5452,5454,5456,5458,5460,5462,5464,5466,5468,5470,5472,5474,5476,5478,5480,5482,5484,5486,5488,5490,5492,5494,5496,5498,5500,5502,5504,5506,5508,5510,
+			5512,5514,5516,5518,5520,5522,5524,5526,5528,5530,5532,5534,5536,5538,5540,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5566,5568,5570,5572,5574,
+			5576,5578,5580,5582,5584,5586,5588,5590,5592,5594,5596,5598,5600,5602,5604,5606,5608,5610,5612,5614,5616,5618,5620,5622,5624,5626,5628,5630,5632,5634,5636,5638,
+			5640,5642,5644,5646,5648,5650,5652,5654,5656,5658,5660,5662,5664,5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,5696,5698,5700,5702,
+			5704,5706,5708,5710,5712,5714,5716,5718,5720,5722,5724,5726,5728,5730,5732,5734,5736,5738,5740,5742,5744,5746,5748,5750,5752,5754,5756,5758,5760,5762,5764,5766,
+			5768,5770,5772,5774,5776,5778,5780,5782,5784,5786,5788,5790,5792,5794,5796,5798,5800,5802,5804,5806,5808,5810,5812,5814,5816,5818,5820,5822,5824,5826,5828,5830,
+			5832,5834,5836,5838,5840,5842,5844,5846,5848,5850,5852,5854,5856,5858,5860,5862,5864,5866,5868,5870,5872,5874,5876,5878,5880,5882,5884,5886,5888,5890,5892,5894,
+			5896,5898,5900,5902,5904,5906,5908,5910,5912,5914,5916,5918,5920,5922,5924,5926,5928,5930,5932,5934,5936,5938,5940,5942,5944,5946,5948,5950,5952,5954,5956,5958,
+			5960,5962,5964,5966,5968,5970,5972,5974,5976,5978,5980,5982,5984,5986,5988,5990,5992,5994,5996,5998,6000,6002,6004,6006,6008,6010,6012,6014,6016,6018,6020,6022,
+			6024,6026,6028,6030,6032,6034,6036,6038,6040,6042,6044,6046,6048,6050,6052,6054,6056,6058,6060,6062,6064,6066,6068,6070,6072,6074,6076,6078,6080,6082,6084,6086,
+			6088,6090,6092,6094,6096,6098,6100,6102,6104,6106,6108,6110,6112,6114,6116,6118,6120,6122,6124,6126,6128,6130,6132,6134,6136,6138,6140,6142,6144,6146,6148,6150,
+			6152,6154,6156,6158,6160,6162,6164,6166,6168,6170,6172,6174,6176,6178,6180,6182,6184,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204,6206,6208,6210,6212,6214,
+			6216,6218,6220,6222,6224,6226,6228,6230,6232,6234,6236,6238,6240,6242,6244,6246,6248,6250,6252,6254,6256,6258,6260,6262,6264,6266,6268,6270,6272,6274,6276,6278,
+			6280,6282,6284,6286,6288,6290,6292,6294,6296,6298,6300,6302,6304,6306,6308,6310,6312,6314,6316,6318,6320,6322,6324,6326,6328,6330,6332,6334,6336,6338,6340,6342,
+			6344,6346,6348,6350,6352,6354,6356,6358,6360,6362,6364,6366,6368,6370,6372,6374,6376,6378,6380,6382,6384,6386,6388,6390,6392,6394,6396,6398,6400,6402,6404,6406,
+			6408,6410,6412,6414,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6440,6442,6444,6446,6448,6450,6452,6454,6456,6458,6460,6462,6464,6466,6468,6470,
+			6472,6474,6476,6478,6480,6482,6484,6486,6488,6490,6492,6494,6496,6498,6500,6502,6504,6506,6508,6510,6512,6514,6516,6518,6520,6522,6524,6526,6528,6530,6532,6534,
+			6536,6538,6540,6542,6544,6546,6548,6550,6552,6554,6556,6558,6560,6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,6582,6584,6586,6588,6590,6592,6594,6596,6598,
+			6600,6602,6604,6606,6608,6610,6612,6614,6616,6618,6620,6622,6624,6626,6628,6630,6632,6634,6636,6638,6640,6642,6644,6646,6648,6650,6652,6654,6656,6658,6660,6662,
+			6664,6666,6668,6670,6672,6674,6676,6678,6680,6682,6684,6686,6688,6690,6692,6694,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716,6718,6720,6722,6724,6726,
+			6728,6730,6732,6734,6736,6738,6740,6742,6744,6746,6748,6750,6752,6754,6756,6758,6760,6762,6764,6766,6768,6770,6772,6774,6776,6778,6780,6782,6784,6786,6788,6790,
+			6792,6794,6796,6798,6800,6802,6804,6806,6808,6810,6812,6814,6816,6818,6820,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840,6842,6844,6846,6848,6850,6852,6854,
+			6856,6858,6860,6862,6864,6866,6868,6870,6872,6874,6876,6878,6880,6882,6884,6886,6888,6890,6892,6894,6896,6898,6900,6902,6904,6906,6908,6910,6912,6914,6916,6918,
+			6920,6922,6924,6926,6928,6930,6932,6934,6936,6938,6940,6942,6944,6946,6948,6950,6952,6954,6956,6958,6960,6962,6964,6966,6968,6970,6972,6974,6976,6978,6980,6982,
+			6984,6986,6988,6990,6992,6994,6996,6998,7000,7002,7004,7006,7008,7010,7012,7014,7016,7018,7020,7022,7024,7026,7028,7030,7032,7034,7036,7038,7040,7042,7044,7046,
+			7048,7050,7052,7054,7056,7058,7060,7062,7064,7066,7068,7070,7072,7074,7076,7078,7080,7082,7084,7086,7088,7090,7092,7094,7096,7098,7100,7102,7104,7106,7108,7110,
+			7112,7114,7116,7118,7120,7122,7124,7126,7128,7130,7132,7134,7136,7138,7140,7142,7144,7146,7148,7150,7152,7154,7156,7158,7160,7162,7164,7166,7168,7170,7172,7174,
+			7176,7178,7180,7182,7184,7186,7188,7190,7192,7194,7196,7198,7200,7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,7228,7230,7232,7234,7236,7238,
+			7240,7242,7244,7246,7248,7250,7252,7254,7256,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,
+			7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,
+			7368,7370,7372,7374,7376,7378,7380,7382,7384,7386,7388,7390,7392,7394,7396,7398,7400,7402,7404,7406,7408,7410,7412,7414,7416,7418,7420,7422,7424,7426,7428,7430,
+			7432,7434,7436,7438,7440,7442,7444,7446,7448,7450,7452,7454,7456,7458,7460,7462,7464,7466,7468,7470,7472,7474,7476,7478,7480,7482,7484,7486,7488,7490,7492,7494,
+			7496,7498,7500,7502,7504,7506,7508,7510,7512,7514,7516,7518,7520,7522,7524,7526,7528,7530,7532,7534,7536,7538,7540,7542,7544,7546,7548,7550,7552,7554,7556,7558,
+			7560,7562,7564,7566,7568,7570,7572,7574,7576,7578,7580,7582,7584,7586,7588,7590,7592,7594,7596,7598,7600,7602,7604,7606,7608,7610,7612,7614,7616,7618,7620,7622,
+			7624,7626,7628,7630,7632,7634,7636,7638,7640,7642,7644,7646,7648,7650,7652,7654,7656,7658,7660,7662,7664,7666,7668,7670,7672,7674,7676,7678,7680,7682,7684,7686,
+			7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,
+			7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,
+			7816,7818,7820,7822,7824,7826,7828,7830,7832,7834,7836,7838,7840,7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,
+			7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,7936,7938,7940,7942,
+			7944,7946,7948,7950,7952,7954,7956,7958,7960,7962,7964,7966,7968,7970,7972,7974,7976,7978,7980,7982,7984,7986,7988,7990,7992,7994,7996,7998,8000,8002,8004,8006,
+			8008,8010,8012,8014,8016,8018,8020,8022,8024,8026,8028,8030,8032,8034,8036,8038,8040,8042,8044,8046,8048,8050,8052,8054,8056,8058,8060,8062,8064,8066,8068
+		},
+		{
+			7949,7947,7945,7943,7941,7939,7937,7935,7933,7931,7929,7927,7925,7923,7921,7919,7917,7915,7913,7911,7909,7907,7905,7903,7901,7899,7897,7895,7893,7891,7889,7887,
+			7885,7883,7881,7879,7877,7875,7873,7871,7869,7867,7865,7863,7861,7859,7857,7855,7853,7851,7849,7847,7845,7843,7841,7839,7837,7835,7833,7831,7829,7827,7825,7823,
+			7821,7819,7817,7815,7813,7811,7809,7807,7805,7803,7801,7799,7797,7795,7793,7791,7789,7787,7785,7783,7781,7779,7777,7775,7773,7771,7769,7767,7765,7763,7761,7759,
+			7757,7755,7753,7751,7749,7747,7745,7743,7741,7739,7737,7735,7733,7731,7729,7727,7725,7723,7721,7719,7717,7715,7713,7711,7709,7707,7705,7703,7701,7699,7697,7695,
+			7693,7691,7689,7687,7685,7683,7681,7679,7677,7675,7673,7671,7669,7667,7665,7663,7661,7659,7657,7655,7653,7651,7649,7647,7645,7643,7641,7639,7637,7635,7633,7631,
+			7629,7627,7625,7623,7621,7619,7617,7615,7613,7611,7609,7607,7605,7603,7601,7599,7597,7595,7593,7591,7589,7587,7585,7583,7581,7579,7577,7575,7573,7571,7569,7567,
+			7565,7563,7561,7559,7557,7555,7553,7551,7549,7547,7545,7543,7541,7539,7537,7535,7533,7531,7529,7527,7525,7523,7521,7519,7517,7515,7513,7511,7509,7507,7505,7503,
+			7501,7499,7497,7495,7493,7491,7489,7487,7485,7483,7481,7479,7477,7475,7473,7471,7469,7467,7465,7463,7461,7459,7457,7455,7453,7451,7449,7447,7445,7443,7441,7439,
+			7437,7435,7433,7431,7429,7427,7425,7423,7421,7419,7417,7415,7413,7411,7409,7407,7405,7403,7401,7399,7397,7395,7393,7391,7389,7387,7385,7383,7381,7379,7377,7375,
+			7373,7371,7369,7367,7365,7363,7361,7359,7357,7355,7353,7351,7349,7347,7345,7343,7341,7339,7337,7335,7333,7331,7329,7327,7325,7323,7321,7319,7317,7315,7313,7311,
+			7309,7307,7305,7303,7301,7299,7297,7295,7293,7291,7289,7287,7285,7283,7281,7279,7277,7275,7273,7271,7269,7267,7265,7263,7261,7259,7257,7255,7253,7251,7249,7247,
+			7245,7243,7241,7239,7237,7235,7233,7231,7229,7227,7225,7223,7221,7219,7217,7215,7213,7211,7209,7207,7205,7203,7201,7199,7197,7195,7193,7191,7189,7187,7185,7183,
+			7181,7179,7177,7175,7173,7171,7169,7167,7165,7163,7161,7159,7157,7155,7153,7151,7149,7147,7145,7143,7141,7139,7137,7135,7133,7131,7129,7127,7125,7123,7121,7119,
+			7117,7115,7113,7111,7109,7107,7105,7103,7101,7099,7097,7095,7093,7091,7089,7087,7085,7083,7081,7079,7077,7075,7073,7071,7069,7067,7065,7063,7061,7059,7057,7055,
+			7053,7051,7049,7047,7045,7043,7041,7039,7037,7035,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,7007,7005,7003,7001,6999,6997,6995,6993,6991,
+			6989,6987,6985,6983,6981,6979,6977,6975,6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,6947,6945,6943,6941,6939,6937,6935,6933,6931,6929,6927,
+			6925,6923,6921,6919,6917,6915,6913,6911,6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,6887,6885,6883,6881,6879,6877,6875,6873,6871,6869,6867,6865,6863,
+			6861,6859,6857,6855,6853,6851,6849,6847,6845,6843,6841,6839,6837,6835,6833,6831,6829,6827,6825,6823,6821,6819,6817,6815,6813,6811,6809,6807,6805,6803,6801,6799,
+			6797,6795,6793,6791,6789,6787,6785,6783,6781,6779,6777,6775,6773,6771,6769,6767,6765,6763,6761,6759,6757,6755,6753,6751,6749,6747,6745,6743,6741,6739,6737,6735,
+			6733,6731,6729,6727,6725,6723,6721,6719,6717,6715,6713,6711,6709,6707,6705,6703,6701,6699,6697,6695,6693,6691,6689,6687,6685,6683,6681,6679,6677,6675,6673,6671,
+			6669,6667,6665,6663,6661,6659,6657,6655,6653,6651,6649,6647,6645,6643,6641,6639,6637,6635,6633,6631,6629,6627,6625,6623,6621,6619,6617,6615,6613,6611,6609,6607,
+			6605,6603,6601,6599,6597,6595,6593,6591,6589,6587,6585,6583,6581,6579,6577,6575,6573,6571,6569,6567,6565,6563,6561,6559,6557,6555,6553,6551,6549,6547,6545,6543,
+			6541,6539,6537,6535,6533,6531,6529,6527,6525,6523,6521,6519,6517,6515,6513,6511,6509,6507,6505,6503,6501,6499,6497,6495,6493,6491,6489,6487,6485,6483,6481,6479,
+			6477,6475,6473,6471,6469,6467,6465,6463,6461,6459,6457,6455,6453,6451,6449,6447,6445,6443,6441,6439,6437,6435,6433,6431,6429,6427,6425,6423,6421,6419,6417,6415,
+			6413,6411,6409,6407,6405,6403,6401,6399,6397,6395,6393,6391,6389,6387,6385,6383,6381,6379,6377,6375,6373,6371,6369,6367,6365,6363,6361,6359,6357,6355,6353,6351,
+			6349,6347,6345,6343,6341,6339,6337,6335,6333,6331,6329,6327,6325,6323,6321,6319,6317,6315,6313,6311,6309,6307,6305,6303,6301,6299,6297,6295,6293,6291,6289,6287,
+			6285,6283,6281,6279,6277,6275,6273,6271,6269,6267,6265,6263,6261,6259,6257,6255,6253,6251,6249,6247,6245,6243,6241,6239,6237,6235,6233,6231,6229,6227,6225,6223,
+			6221,6219,6217,6215,6213,6211,6209,6207,6205,6203,6201,6199,6197,6195,6193,6191,6189,6187,6185,6183,6181,6179,6177,6175,6173,6171,6169,6167,6165,6163,6161,6159,
+			6157,6155,6153,6151,6149,6147,6145,6143,6141,6139,6137,6135,6133,6131,6129,6127,6125,6123,6121,6119,6117,6115,6113,6111,6109,6107,6105,6103,6101,6099,6097,6095,
+			6093,6091,6089,6087,6085,6083,6081,6079,6077,6075,6073,6071,6069,6067,6065,6063,6061,6059,6057,6055,6053,6051,6049,6047,6045,6043,6041,6039,6037,6035,6033,6031,
+			6029,6027,6025,6023,6021,6019,6017,6015,6013,6011,6009,6007,6005,6003,6001,5999,5997,5995,5993,5991,5989,5987,5985,5983,5981,5979,5977,5975,5973,5971,5969,5967,
+			5965,5963,5961,5959,5957,5955,5953,5951,5949,5947,5945,5943,5941,5939,5937,5935,5933,5931,5929,5927,5925,5923,5921,5919,5917,5915,5913,5911,5909,5907,5905,5903,
+			5901,5899,5897,5895,5893,5891,5889,5887,5885,5883,5881,5879,5877,5875,5873,5871,5869,5867,5865,5863,5861,5859,5857,5855,5853,5851,5849,5847,5845,5843,5841,5839,
+			5837,5835,5833,5831,5829,5827,5825,5823,5821,5819,5817,5815,5813,5811,5809,5807,5805,5803,5801,5799,5797,5795,5793,5791,5789,5787,5785,5783,5781,5779,5777,5775,
+			5773,5771,5769,5767,5765,5763,5761,5759,5757,5755,5753,5751,5749,5747,5745,5743,5741,5739,5737,5735,5733,5731,5729,5727,5725,5723,5721,5719,5717,5715,5713,5711,
+			5709,5707,5705,5703,5701,5699,5697,5695,5693,5691,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,5663,5661,5659,5657,5655,5653,5651,5649,5647,
+			5645,5643,5641,5639,5637,5635,5633,5631,5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,5599,5597,5595,5593,5591,5589,5587,5585,5583,
+			5581,5579,5577,5575,5573,5571,5569,5567,5565,5563,5561,5559,5557,5555,5553,5551,5549,5547,5545,5543,5541,5539,5537,5535,5533,5531,5529,5527,5525,5523,5521,5519,
+			5517,5515,5513,5511,5509,5507,5505,5503,5501,5499,5497,5495,5493,5491,5489,5487,5485,5483,5481,5479,5477,5475,5473,5471,5469,5467,5465,5463,5461,5459,5457,5455,
+			5453,5451,5449,5447,5445,5443,5441,5439,5437,5435,5433,5431,5429,5427,5425,5423,5421,5419,5417,5415,5413,5411,5409,5407,5405,5403,5401,5399,5397,5395,5393,5391,
+			5389,5387,5385,5383,5381,5379,5377,5375,5373,5371,5369,5367,5365,5363,5361,5359,5357,5355,5353,5351,5349,5347,5345,5343,5341,5339,5337,5335,5333,5331,5329,5327,
+			5325,5323,5321,5319,5317,5315,5313,5311,5309,5307,5305,5303,5301,5299,5297,5295,5293,5291,5289,5287,5285,5283,5281,5279,5277,5275,5273,5271,5269,5267,5265,5263,
+			5261,5259,5257,5255,5253,5251,5249,5247,5245,5243,5241,5239,5237,5235,5233,5231,5229,5227,5225,5223,5221,5219,5217,5215,5213,5211,5209,5207,5205,5203,5201,5199,
+			5197,5195,5193,5191,5189,5187,5185,5183,5181,5179,5177,5175,5173,5171,5169,5167,5165,5163,5161,5159,5157,5155,5153,5151,5149,5147,5145,5143,5141,5139,5137,5135,
+			5133,5131,5129,5127,5125,5123,5121,5119,5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,5093,5091,5089,5087,5085,5083,5081,5079,5077,5075,5073,5071,
+			5069,5067,5065,5063,5061,5059,5057,5055,5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,5033,5031,5029,5027,5025,5023,5021,5019,5017,5015,5013,5011,5009,5007,
+			5005,5003,5001,4999,4997,4995,4993,4991,4989,4987,4985,4983,4981,4979,4977,4975,4973,4971,4969,4967,4965,4963,4961,4959,4957,4955,4953,4951,4949,4947,4945,4943,
+			4941,4939,4937,4935,4933,4931,4929,4927,4925,4923,4921,4919,4917,4915,4913,4911,4909,4907,4905,4903,4901,4899,4897,4895,4893,4891,4889,4887,4885,4883,4881,4879,
+			4877,4875,4873,4871,4869,4867,4865,4863,4861,4859,4857,4855,4853,4851,4849,4847,4845,4843,4841,4839,4837,4835,4833,4831,4829,4827,4825,4823,4821,4819,4817,4815,
+			4813,4811,4809,4807,4805,4803,4801,4799,4797,4795,4793,4791,4789,4787,4785,4783,4781,4779,4777,4775,4773,4771,4769,4767,4765,4763,4761,4759,4757,4755,4753,4751,
+			4749,4747,4745,4743,4741,4739,4737,4735,4733,4731,4729,4727,4725,4723,4721,4719,4717,4715,4713,4711,4709,4707,4705,4703,4701,4699,4697,4695,4693,4691,4689,4687,
+			4685,4683,4681,4679,4677,4675,4673,4671,4669,4667,4665,4663,4661,4659,4657,4655,4653,4651,4649,4647,4645,4643,4641,4639,4637,4635,4633,4631,4629,4627,4625,4623,
+			4621,4619,4617,4615,4613,4611,4609,4607,4605,4603,4601,4599,4597,4595,4593,4591,4589,4587,4585,4583,4581,4579,4577,4575,4573,4571,4569,4567,4565,4563,4561,4559,
+			4557,4555,4553,4551,4549,4547,4545,4543,4541,4539,4537,4535,4533,4531,4529,4527,4525,4523,4521,4519,4517,4515,4513,4511,4509,4507,4505,4503,4501,4499,4497,4495,
+			4493,4491,4489,4487,4485,4483,4481,4479,4477,4475,4473,4471,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,4447,4445,4443,4441,4439,4437,4435,4433,4431,
+			4429,4427,4425,4423,4421,4419,4417,4415,4413,4411,4409,4407,4405,4403,4401,4399,4397,4395,4393,4391,4389,4387,4385,4383,4381,4379,4377,4375,4373,4371,4369,4367,
+			4365,4363,4361,4359,4357,4355,4353,4351,4349,4347,4345,4343,4341,4339,4337,4335,4333,4331,4329,4327,4325,4323,4321,4319,4317,4315,4313,4311,4309,4307,4305,4303,
+			4301,4299,4297,4295,4293,4291,4289,4287,4285,4283,4281,4279,4277,4275,4273,4271,4269,4267,4265,4263,4261,4259,4257,4255,4253,4251,4249,4247,4245,4243,4241,4239,
+			4237,4235,4233,4231,4229,4227,4225,4223,4221,4219,4217,4215,4213,4211,4209,4207,4205,4203,4201,4199,4197,4195,4193,4191,4189,4187,4185,4183,4181,4179,4177,4175,
+			4173,4171,4169,4167,4165,4163,4161,4159,4157,4155,4153,4151,4149,4147,4145,4143,4141,4139,4137,4135,4133,4131,4129,4127,4125,4123,4121,4119,4117,4115,4113,4111,
+			4109,4107,4105,4103,4101,4099,4097,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,
+			29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,
+			29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,
+			29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,31,29,27,25,23,21,19,17,30,
+			16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,
+			16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,
+			16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,
+			16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,16,18,20,22,24,26,28,30,4096,4098,4100,4102,4104,4106,4108,4110,
+			4112,4114,4116,4118,4120,4122,4124,4126,4128,4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,4160,4162,4164,4166,4168,4170,4172,4174,
+			4176,4178,4180,4182,4184,4186,4188,4190,4192,4194,4196,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226,4228,4230,4232,4234,4236,4238,
+			4240,4242,4244,4246,4248,4250,4252,4254,4256,4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,4288,4290,4292,4294,4296,4298,4300,4302,
+			4304,4306,4308,4310,4312,4314,4316,4318,4320,4322,4324,4326,4328,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,4352,4354,4356,4358,4360,4362,4364,4366,
+			4368,4370,4372,4374,4376,4378,4380,4382,4384,4386,4388,4390,4392,4394,4396,4398,4400,4402,4404,4406,4408,4410,4412,4414,4416,4418,4420,4422,4424,4426,4428,4430,
+			4432,4434,4436,4438,4440,4442,4444,4446,4448,4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472,4474,4476,4478,4480,4482,4484,4486,4488,4490,4492,4494,
+			4496,4498,4500,4502,4504,4506,4508,4510,4512,4514,4516,4518,4520,4522,4524,4526,4528,4530,4532,4534,4536,4538,4540,4542,4544,4546,4548,4550,4552,4554,4556,4558,
+			4560,4562,4564,4566,4568,4570,4572,4574,4576,4578,4580,4582,4584,4586,4588,4590,4592,4594,4596,4598,4600,4602,4604,4606,4608,4610,4612,4614,4616,4618,4620,4622,
+			4624,4626,4628,4630,4632,4634,4636,4638,4640,4642,4644,4646,4648,4650,4652,4654,4656,4658,4660,4662,4664,4666,4668,4670,4672,4674,4676,4678,4680,4682,4684,4686,
+			4688,4690,4692,4694,4696,4698,4700,4702,4704,4706,4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,4740,4742,4744,4746,4748,4750,
+			4752,4754,4756,4758,4760,4762,4764,4766,4768,4770,4772,4774,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,4800,4802,4804,4806,4808,4810,4812,4814,
+			4816,4818,4820,4822,4824,4826,4828,4830,4832,4834,4836,4838,4840,4842,4844,4846,4848,4850,4852,4854,4856,4858,4860,4862,4864,4866,4868,4870,4872,4874,4876,4878,
+			4880,4882,4884,4886,4888,4890,4892,4894,4896,4898,4900,4902,4904,4906,4908,4910,4912,4914,4916,4918,4920,4922,4924,4926,4928,4930,4932,4934,4936,4938,4940,4942,
+			4944,4946,4948,4950,4952,4954,4956,4958,4960,4962,4964,4966,4968,4970,4972,4974,4976,4978,4980,4982,4984,4986,4988,4990,4992,4994,4996,4998,5000,5002,5004,5006,
+			5008,5010,5012,5014,5016,5018,5020,5022,5024,5026,5028,5030,5032,5034,5036,5038,5040,5042,5044,5046,5048,5050,5052,5054,5056,5058,5060,5062,5064,5066,5068,5070,
+			5072,5074,5076,5078,5080,5082,5084,5086,5088,5090,5092,5094,5096,5098,5100,5102,5104,5106,5108,5110,5112,5114,5116,5118,5120,5122,5124,5126,5128,5130,5132,5134,
+			5136,5138,5140,5142,5144,5146,5148,5150,5152,5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5176,5178,5180,5182,5184,5186,5188,5190,5192,5194,5196,5198,
+			5200,5202,5204,5206,5208,5210,5212,5214,5216,5218,5220,5222,5224,5226,5228,5230,5232,5234,5236,5238,5240,5242,5244,5246,5248,5250,5252,5254,5256,5258,5260,5262,
+			5264,5266,5268,5270,5272,5274,5276,5278,5280,5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,5316,5318,5320,5322,5324,5326,
+			5328,5330,5332,5334,5336,5338,5340,5342,5344,5346,5348,5350,5352,5354,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,5376,5378,5380,5382,5384,5386,5388,5390,
+			5392,5394,5396,5398,5400,5402,5404,5406,5408,5410,5412,5414,5416,5418,5420,5422,5424,5426,5428,5430,5432,5434,5436,5438,5440,5442,5444,5446,5448,5450,5452,5454,
+			5456,5458,5460,5462,5464,5466,5468,5470,5472,5474,5476,5478,5480,5482,5484,5486,5488,5490,5492,5494,5496,5498,5500,5502,5504,5506,5508,5510,5512,5514,5516,5518,
+			5520,5522,5524,5526,5528,5530,5532,5534,5536,5538,5540,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5566,5568,5570,5572,5574,5576,5578,5580,5582,
+			5584,5586,5588,5590,5592,5594,5596,5598,5600,5602,5604,5606,5608,5610,5612,5614,5616,5618,5620,5622,5624,5626,5628,5630,5632,5634,5636,5638,5640,5642,5644,5646,
+			5648,5650,5652,5654,5656,5658,5660,5662,5664,5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,5696,5698,5700,5702,5704,5706,5708,5710,
+			5712,5714,5716,5718,5720,5722,5724,5726,5728,5730,5732,5734,5736,5738,5740,5742,5744,5746,5748,5750,5752,5754,5756,5758,5760,5762,5764,5766,5768,5770,5772,5774,
+			5776,5778,5780,5782,5784,5786,5788,5790,5792,5794,5796,5798,5800,5802,5804,5806,5808,5810,5812,5814,5816,5818,5820,5822,5824,5826,5828,5830,5832,5834,5836,5838,
+			5840,5842,5844,5846,5848,5850,5852,5854,5856,5858,5860,5862,5864,5866,5868,5870,5872,5874,5876,5878,5880,5882,5884,5886,5888,5890,5892,5894,5896,5898,5900,5902,
+			5904,5906,5908,5910,5912,5914,5916,5918,5920,5922,5924,5926,5928,5930,5932,5934,5936,5938,5940,5942,5944,5946,5948,5950,5952,5954,5956,5958,5960,5962,5964,5966,
+			5968,5970,5972,5974,5976,5978,5980,5982,5984,5986,5988,5990,5992,5994,5996,5998,6000,6002,6004,6006,6008,6010,6012,6014,6016,6018,6020,6022,6024,6026,6028,6030,
+			6032,6034,6036,6038,6040,6042,6044,6046,6048,6050,6052,6054,6056,6058,6060,6062,6064,6066,6068,6070,6072,6074,6076,6078,6080,6082,6084,6086,6088,6090,6092,6094,
+			6096,6098,6100,6102,6104,6106,6108,6110,6112,6114,6116,6118,6120,6122,6124,6126,6128,6130,6132,6134,6136,6138,6140,6142,6144,6146,6148,6150,6152,6154,6156,6158,
+			6160,6162,6164,6166,6168,6170,6172,6174,6176,6178,6180,6182,6184,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204,6206,6208,6210,6212,6214,6216,6218,6220,6222,
+			6224,6226,6228,6230,6232,6234,6236,6238,6240,6242,6244,6246,6248,6250,6252,6254,6256,6258,6260,6262,6264,6266,6268,6270,6272,6274,6276,6278,6280,6282,6284,6286,
+			6288,6290,6292,6294,6296,6298,6300,6302,6304,6306,6308,6310,6312,6314,6316,6318,6320,6322,6324,6326,6328,6330,6332,6334,6336,6338,6340,6342,6344,6346,6348,6350,
+			6352,6354,6356,6358,6360,6362,6364,6366,6368,6370,6372,6374,6376,6378,6380,6382,6384,6386,6388,6390,6392,6394,6396,6398,6400,6402,6404,6406,6408,6410,6412,6414,
+			6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6440,6442,6444,6446,6448,6450,6452,6454,6456,6458,6460,6462,6464,6466,6468,6470,6472,6474,6476,6478,
+			6480,6482,6484,6486,6488,6490,6492,6494,6496,6498,6500,6502,6504,6506,6508,6510,6512,6514,6516,6518,6520,6522,6524,6526,6528,6530,6532,6534,6536,6538,6540,6542,
+			6544,6546,6548,6550,6552,6554,6556,6558,6560,6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,6582,6584,6586,6588,6590,6592,6594,6596,6598,6600,6602,6604,6606,
+			6608,6610,6612,6614,6616,6618,6620,6622,6624,6626,6628,6630,6632,6634,6636,6638,6640,6642,6644,6646,6648,6650,6652,6654,6656,6658,6660,6662,6664,6666,6668,6670,
+			6672,6674,6676,6678,6680,6682,6684,6686,6688,6690,6692,6694,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716,6718,6720,6722,6724,6726,6728,6730,6732,6734,
+			6736,6738,6740,6742,6744,6746,6748,6750,6752,6754,6756,6758,6760,6762,6764,6766,6768,6770,6772,6774,6776,6778,6780,6782,6784,6786,6788,6790,6792,6794,6796,6798,
+			6800,6802,6804,6806,6808,6810,6812,6814,6816,6818,6820,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840,6842,6844,6846,6848,6850,6852,6854,6856,6858,6860,6862,
+			6864,6866,6868,6870,6872,6874,6876,6878,6880,6882,6884,6886,6888,6890,6892,6894,6896,6898,6900,6902,6904,6906,6908,6910,6912,6914,6916,6918,6920,6922,6924,6926,
+			6928,6930,6932,6934,6936,6938,6940,6942,6944,6946,6948,6950,6952,6954,6956,6958,6960,6962,6964,6966,6968,6970,6972,6974,6976,6978,6980,6982,6984,6986,6988,6990,
+			6992,6994,6996,6998,7000,7002,7004,7006,7008,7010,7012,7014,7016,7018,7020,7022,7024,7026,7028,7030,7032,7034,7036,7038,7040,7042,7044,7046,7048,7050,7052,7054,
+			7056,7058,7060,7062,7064,7066,7068,7070,7072,7074,7076,7078,7080,7082,7084,7086,7088,7090,7092,7094,7096,7098,7100,7102,7104,7106,7108,7110,7112,7114,7116,7118,
+			7120,7122,7124,7126,7128,7130,7132,7134,7136,7138,7140,7142,7144,7146,7148,7150,7152,7154,7156,7158,7160,7162,7164,7166,7168,7170,7172,7174,7176,7178,7180,7182,
+			7184,7186,7188,7190,7192,7194,7196,7198,7200,7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,7228,7230,7232,7234,7236,7238,7240,7242,7244,7246,
+			7248,7250,7252,7254,7256,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,
+			7312,7314,7316,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7372,7374,
+			7376,7378,7380,7382,7384,7386,7388,7390,7392,7394,7396,7398,7400,7402,7404,7406,7408,7410,7412,7414,7416,7418,7420,7422,7424,7426,7428,7430,7432,7434,7436,7438,
+			7440,7442,7444,7446,7448,7450,7452,7454,7456,7458,7460,7462,7464,7466,7468,7470,7472,7474,7476,7478,7480,7482,7484,7486,7488,7490,7492,7494,7496,7498,7500,7502,
+			7504,7506,7508,7510,7512,7514,7516,7518,7520,7522,7524,7526,7528,7530,7532,7534,7536,7538,7540,7542,7544,7546,7548,7550,7552,7554,7556,7558,7560,7562,7564,7566,
+			7568,7570,7572,7574,7576,7578,7580,7582,7584,7586,7588,7590,7592,7594,7596,7598,7600,7602,7604,7606,7608,7610,7612,7614,7616,7618,7620,7622,7624,7626,7628,7630,
+			7632,7634,7636,7638,7640,7642,7644,7646,7648,7650,7652,7654,7656,7658,7660,7662,7664,7666,7668,7670,7672,7674,7676,7678,7680,7682,7684,7686,7688,7690,7692,7694,
+			7696,7698,7700,7702,7704,7706,7708,7710,7712,7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,7752,7754,7756,7758,
+			7760,7762,7764,7766,7768,7770,7772,7774,7776,7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,7816,7818,7820,7822,
+			7824,7826,7828,7830,7832,7834,7836,7838,7840,7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,7880,7882,7884,7886,
+			7888,7890,7892,7894,7896,7898,7900,7902,7904,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,7936,7938,7940,7942,7944,7946,7948
+		},
+		{
+			7709,7707,7705,7703,7701,7699,7697,7695,7693,7691,7689,7687,7685,7683,7681,7679,7677,7675,7673,7671,7669,7667,7665,7663,7661,7659,7657,7655,7653,7651,7649,7647,
+			7645,7643,7641,7639,7637,7635,7633,7631,7629,7627,7625,7623,7621,7619,7617,7615,7613,7611,7609,7607,7605,7603,7601,7599,7597,7595,7593,7591,7589,7587,7585,7583,
+			7581,7579,7577,7575,7573,7571,7569,7567,7565,7563,7561,7559,7557,7555,7553,7551,7549,7547,7545,7543,7541,7539,7537,7535,7533,7531,7529,7527,7525,7523,7521,7519,
+			7517,7515,7513,7511,7509,7507,7505,7503,7501,7499,7497,7495,7493,7491,7489,7487,7485,7483,7481,7479,7477,7475,7473,7471,7469,7467,7465,7463,7461,7459,7457,7455,
+			7453,7451,7449,7447,7445,7443,7441,7439,7437,7435,7433,7431,7429,7427,7425,7423,7421,7419,7417,7415,7413,7411,7409,7407,7405,7403,7401,7399,7397,7395,7393,7391,
+			7389,7387,7385,7383,7381,7379,7377,7375,7373,7371,7369,7367,7365,7363,7361,7359,7357,7355,7353,7351,7349,7347,7345,7343,7341,7339,7337,7335,7333,7331,7329,7327,
+			7325,7323,7321,7319,7317,7315,7313,7311,7309,7307,7305,7303,7301,7299,7297,7295,7293,7291,7289,7287,7285,7283,7281,7279,7277,7275,7273,7271,7269,7267,7265,7263,
+			7261,7259,7257,7255,7253,7251,7249,7247,7245,7243,7241,7239,7237,7235,7233,7231,7229,7227,7225,7223,7221,7219,7217,7215,7213,7211,7209,7207,7205,7203,7201,7199,
+			7197,7195,7193,7191,7189,7187,7185,7183,7181,7179,7177,7175,7173,7171,7169,7167,7165,7163,7161,7159,7157,7155,7153,7151,7149,7147,7145,7143,7141,7139,7137,7135,
+			7133,7131,7129,7127,7125,7123,7121,7119,7117,7115,7113,7111,7109,7107,7105,7103,7101,7099,7097,7095,7093,7091,7089,7087,7085,7083,7081,7079,7077,7075,7073,7071,
+			7069,7067,7065,7063,7061,7059,7057,7055,7053,7051,7049,7047,7045,7043,7041,7039,7037,7035,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,7007,
+			7005,7003,7001,6999,6997,6995,6993,6991,6989,6987,6985,6983,6981,6979,6977,6975,6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,6947,6945,6943,
+			6941,6939,6937,6935,6933,6931,6929,6927,6925,6923,6921,6919,6917,6915,6913,6911,6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,6887,6885,6883,6881,6879,
+			6877,6875,6873,6871,6869,6867,6865,6863,6861,6859,6857,6855,6853,6851,6849,6847,6845,6843,6841,6839,6837,6835,6833,6831,6829,6827,6825,6823,6821,6819,6817,6815,
+			6813,6811,6809,6807,6805,6803,6801,6799,6797,6795,6793,6791,6789,6787,6785,6783,6781,6779,6777,6775,6773,6771,6769,6767,6765,6763,6761,6759,6757,6755,6753,6751,
+			6749,6747,6745,6743,6741,6739,6737,6735,6733,6731,6729,6727,6725,6723,6721,6719,6717,6715,6713,6711,6709,6707,6705,6703,6701,6699,6697,6695,6693,6691,6689,6687,
+			6685,6683,6681,6679,6677,6675,6673,6671,6669,6667,6665,6663,6661,6659,6657,6655,6653,6651,6649,6647,6645,6643,6641,6639,6637,6635,6633,6631,6629,6627,6625,6623,
+			6621,6619,6617,6615,6613,6611,6609,6607,6605,6603,6601,6599,6597,6595,6593,6591,6589,6587,6585,6583,6581,6579,6577,6575,6573,6571,6569,6567,6565,6563,6561,6559,
+			6557,6555,6553,6551,6549,6547,6545,6543,6541,6539,6537,6535,6533,6531,6529,6527,6525,6523,6521,6519,6517,6515,6513,6511,6509,6507,6505,6503,6501,6499,6497,6495,
+			6493,6491,6489,6487,6485,6483,6481,6479,6477,6475,6473,6471,6469,6467,6465,6463,6461,6459,6457,6455,6453,6451,6449,6447,6445,6443,6441,6439,6437,6435,6433,6431,
+			6429,6427,6425,6423,6421,6419,6417,6415,6413,6411,6409,6407,6405,6403,6401,6399,6397,6395,6393,6391,6389,6387,6385,6383,6381,6379,6377,6375,6373,6371,6369,6367,
+			6365,6363,6361,6359,6357,6355,6353,6351,6349,6347,6345,6343,6341,6339,6337,6335,6333,6331,6329,6327,6325,6323,6321,6319,6317,6315,6313,6311,6309,6307,6305,6303,
+			6301,6299,6297,6295,6293,6291,6289,6287,6285,6283,6281,6279,6277,6275,6273,6271,6269,6267,6265,6263,6261,6259,6257,6255,6253,6251,6249,6247,6245,6243,6241,6239,
+			6237,6235,6233,6231,6229,6227,6225,6223,6221,6219,6217,6215,6213,6211,6209,6207,6205,6203,6201,6199,6197,6195,6193,6191,6189,6187,6185,6183,6181,6179,6177,6175,
+			6173,6171,6169,6167,6165,6163,6161,6159,6157,6155,6153,6151,6149,6147,6145,6143,6141,6139,6137,6135,6133,6131,6129,6127,6125,6123,6121,6119,6117,6115,6113,6111,
+			6109,6107,6105,6103,6101,6099,6097,6095,6093,6091,6089,6087,6085,6083,6081,6079,6077,6075,6073,6071,6069,6067,6065,6063,6061,6059,6057,6055,6053,6051,6049,6047,
+			6045,6043,6041,6039,6037,6035,6033,6031,6029,6027,6025,6023,6021,6019,6017,6015,6013,6011,6009,6007,6005,6003,6001,5999,5997,5995,5993,5991,5989,5987,5985,5983,
+			5981,5979,5977,5975,5973,5971,5969,5967,5965,5963,5961,5959,5957,5955,5953,5951,5949,5947,5945,5943,5941,5939,5937,5935,5933,5931,5929,5927,5925,5923,5921,5919,
+			5917,5915,5913,5911,5909,5907,5905,5903,5901,5899,5897,5895,5893,5891,5889,5887,5885,5883,5881,5879,5877,5875,5873,5871,5869,5867,5865,5863,5861,5859,5857,5855,
+			5853,5851,5849,5847,5845,5843,5841,5839,5837,5835,5833,5831,5829,5827,5825,5823,5821,5819,5817,5815,5813,5811,5809,5807,5805,5803,5801,5799,5797,5795,5793,5791,
+			5789,5787,5785,5783,5781,5779,5777,5775,5773,5771,5769,5767,5765,5763,5761,5759,5757,5755,5753,5751,5749,5747,5745,5743,5741,5739,5737,5735,5733,5731,5729,5727,
+			5725,5723,5721,5719,5717,5715,5713,5711,5709,5707,5705,5703,5701,5699,5697,5695,5693,5691,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,5663,
+			5661,5659,5657,5655,5653,5651,5649,5647,5645,5643,5641,5639,5637,5635,5633,5631,5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,5599,
+			5597,5595,5593,5591,5589,5587,5585,5583,5581,5579,5577,5575,5573,5571,5569,5567,5565,5563,5561,5559,5557,5555,5553,5551,5549,5547,5545,5543,5541,5539,5537,5535,
+			5533,5531,5529,5527,5525,5523,5521,5519,5517,5515,5513,5511,5509,5507,5505,5503,5501,5499,5497,5495,5493,5491,5489,5487,5485,5483,5481,5479,5477,5475,5473,5471,
+			5469,5467,5465,5463,5461,5459,5457,5455,5453,5451,5449,5447,5445,5443,5441,5439,5437,5435,5433,5431,5429,5427,5425,5423,5421,5419,5417,5415,5413,5411,5409,5407,
+			5405,5403,5401,5399,5397,5395,5393,5391,5389,5387,5385,5383,5381,5379,5377,5375,5373,5371,5369,5367,5365,5363,5361,5359,5357,5355,5353,5351,5349,5347,5345,5343,
+			5341,5339,5337,5335,5333,5331,5329,5327,5325,5323,5321,5319,5317,5315,5313,5311,5309,5307,5305,5303,5301,5299,5297,5295,5293,5291,5289,5287,5285,5283,5281,5279,
+			5277,5275,5273,5271,5269,5267,5265,5263,5261,5259,5257,5255,5253,5251,5249,5247,5245,5243,5241,5239,5237,5235,5233,5231,5229,5227,5225,5223,5221,5219,5217,5215,
+			5213,5211,5209,5207,5205,5203,5201,5199,5197,5195,5193,5191,5189,5187,5185,5183,5181,5179,5177,5175,5173,5171,5169,5167,5165,5163,5161,5159,5157,5155,5153,5151,
+			5149,5147,5145,5143,5141,5139,5137,5135,5133,5131,5129,5127,5125,5123,5121,5119,5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,5093,5091,5089,5087,
+			5085,5083,5081,5079,5077,5075,5073,5071,5069,5067,5065,5063,5061,5059,5057,5055,5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,5033,5031,5029,5027,5025,5023,
+			5021,5019,5017,5015,5013,5011,5009,5007,5005,5003,5001,4999,4997,4995,4993,4991,4989,4987,4985,4983,4981,4979,4977,4975,4973,4971,4969,4967,4965,4963,4961,4959,
+			4957,4955,4953,4951,4949,4947,4945,4943,4941,4939,4937,4935,4933,4931,4929,4927,4925,4923,4921,4919,4917,4915,4913,4911,4909,4907,4905,4903,4901,4899,4897,4895,
+			4893,4891,4889,4887,4885,4883,4881,4879,4877,4875,4873,4871,4869,4867,4865,4863,4861,4859,4857,4855,4853,4851,4849,4847,4845,4843,4841,4839,4837,4835,4833,4831,
+			4829,4827,4825,4823,4821,4819,4817,4815,4813,4811,4809,4807,4805,4803,4801,4799,4797,4795,4793,4791,4789,4787,4785,4783,4781,4779,4777,4775,4773,4771,4769,4767,
+			4765,4763,4761,4759,4757,4755,4753,4751,4749,4747,4745,4743,4741,4739,4737,4735,4733,4731,4729,4727,4725,4723,4721,4719,4717,4715,4713,4711,4709,4707,4705,4703,
+			4701,4699,4697,4695,4693,4691,4689,4687,4685,4683,4681,4679,4677,4675,4673,4671,4669,4667,4665,4663,4661,4659,4657,4655,4653,4651,4649,4647,4645,4643,4641,4639,
+			4637,4635,4633,4631,4629,4627,4625,4623,4621,4619,4617,4615,4613,4611,4609,4607,4605,4603,4601,4599,4597,4595,4593,4591,4589,4587,4585,4583,4581,4579,4577,4575,
+			4573,4571,4569,4567,4565,4563,4561,4559,4557,4555,4553,4551,4549,4547,4545,4543,4541,4539,4537,4535,4533,4531,4529,4527,4525,4523,4521,4519,4517,4515,4513,4511,
+			4509,4507,4505,4503,4501,4499,4497,4495,4493,4491,4489,4487,4485,4483,4481,4479,4477,4475,4473,4471,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,4447,
+			4445,4443,4441,4439,4437,4435,4433,4431,4429,4427,4425,4423,4421,4419,4417,4415,4413,4411,4409,4407,4405,4403,4401,4399,4397,4395,4393,4391,4389,4387,4385,4383,
+			4381,4379,4377,4375,4373,4371,4369,4367,4365,4363,4361,4359,4357,4355,4353,4351,4349,4347,4345,4343,4341,4339,4337,4335,4333,4331,4329,4327,4325,4323,4321,4319,
+			4317,4315,4313,4311,4309,4307,4305,4303,4301,4299,4297,4295,4293,4291,4289,4287,4285,4283,4281,4279,4277,4275,4273,4271,4269,4267,4265,4263,4261,4259,4257,4255,
+			4253,4251,4249,4247,4245,4243,4241,4239,4237,4235,4233,4231,4229,4227,4225,4223,4221,4219,4217,4215,4213,4211,4209,4207,4205,4203,4201,4199,4197,4195,4193,4191,
+			4189,4187,4185,4183,4181,4179,4177,4175,4173,4171,4169,4167,4165,4163,4161,4159,4157,4155,4153,4151,4149,4147,4145,4143,4141,4139,4137,4135,4133,4131,4129,4127,
+			4125,4123,4121,4119,4117,4115,4113,4111,4109,4107,4105,4103,4101,4099,4097,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,
+			61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,
+			61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,
+			61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,
+			61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,
+			61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,
+			61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,
+			61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
+			32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,4096,4098,4100,4102,4104,4106,4108,4110,4112,4114,4116,4118,4120,4122,4124,4126,
+			4128,4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,4160,4162,4164,4166,4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,
+			4192,4194,4196,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226,4228,4230,4232,4234,4236,4238,4240,4242,4244,4246,4248,4250,4252,4254,
+			4256,4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,4288,4290,4292,4294,4296,4298,4300,4302,4304,4306,4308,4310,4312,4314,4316,4318,
+			4320,4322,4324,4326,4328,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,4352,4354,4356,4358,4360,4362,4364,4366,4368,4370,4372,4374,4376,4378,4380,4382,
+			4384,4386,4388,4390,4392,4394,4396,4398,4400,4402,4404,4406,4408,4410,4412,4414,4416,4418,4420,4422,4424,4426,4428,4430,4432,4434,4436,4438,4440,4442,4444,4446,
+			4448,4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472,4474,4476,4478,4480,4482,4484,4486,4488,4490,4492,4494,4496,4498,4500,4502,4504,4506,4508,4510,
+			4512,4514,4516,4518,4520,4522,4524,4526,4528,4530,4532,4534,4536,4538,4540,4542,4544,4546,4548,4550,4552,4554,4556,4558,4560,4562,4564,4566,4568,4570,4572,4574,
+			4576,4578,4580,4582,4584,4586,4588,4590,4592,4594,4596,4598,4600,4602,4604,4606,4608,4610,4612,4614,4616,4618,4620,4622,4624,4626,4628,4630,4632,4634,4636,4638,
+			4640,4642,4644,4646,4648,4650,4652,4654,4656,4658,4660,4662,4664,4666,4668,4670,4672,4674,4676,4678,4680,4682,4684,4686,4688,4690,4692,4694,4696,4698,4700,4702,
+			4704,4706,4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,4740,4742,4744,4746,4748,4750,4752,4754,4756,4758,4760,4762,4764,4766,
+			4768,4770,4772,4774,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,4800,4802,4804,4806,4808,4810,4812,4814,4816,4818,4820,4822,4824,4826,4828,4830,
+			4832,4834,4836,4838,4840,4842,4844,4846,4848,4850,4852,4854,4856,4858,4860,4862,4864,4866,4868,4870,4872,4874,4876,4878,4880,4882,4884,4886,4888,4890,4892,4894,
+			4896,4898,4900,4902,4904,4906,4908,4910,4912,4914,4916,4918,4920,4922,4924,4926,4928,4930,4932,4934,4936,4938,4940,4942,4944,4946,4948,4950,4952,4954,4956,4958,
+			4960,4962,4964,4966,4968,4970,4972,4974,4976,4978,4980,4982,4984,4986,4988,4990,4992,4994,4996,4998,5000,5002,5004,5006,5008,5010,5012,5014,5016,5018,5020,5022,
+			5024,5026,5028,5030,5032,5034,5036,5038,5040,5042,5044,5046,5048,5050,5052,5054,5056,5058,5060,5062,5064,5066,5068,5070,5072,5074,5076,5078,5080,5082,5084,5086,
+			5088,5090,5092,5094,5096,5098,5100,5102,5104,5106,5108,5110,5112,5114,5116,5118,5120,5122,5124,5126,5128,5130,5132,5134,5136,5138,5140,5142,5144,5146,5148,5150,
+			5152,5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5176,5178,5180,5182,5184,5186,5188,5190,5192,5194,5196,5198,5200,5202,5204,5206,5208,5210,5212,5214,
+			5216,5218,5220,5222,5224,5226,5228,5230,5232,5234,5236,5238,5240,5242,5244,5246,5248,5250,5252,5254,5256,5258,5260,5262,5264,5266,5268,5270,5272,5274,5276,5278,
+			5280,5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,5316,5318,5320,5322,5324,5326,5328,5330,5332,5334,5336,5338,5340,5342,
+			5344,5346,5348,5350,5352,5354,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,5376,5378,5380,5382,5384,5386,5388,5390,5392,5394,5396,5398,5400,5402,5404,5406,
+			5408,5410,5412,5414,5416,5418,5420,5422,5424,5426,5428,5430,5432,5434,5436,5438,5440,5442,5444,5446,5448,5450,5452,5454,5456,5458,5460,5462,5464,5466,5468,5470,
+			5472,5474,5476,5478,5480,5482,5484,5486,5488,5490,5492,5494,5496,5498,5500,5502,5504,5506,5508,5510,5512,5514,5516,5518,5520,5522,5524,5526,5528,5530,5532,5534,
+			5536,5538,5540,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5566,5568,5570,5572,5574,5576,5578,5580,5582,5584,5586,5588,5590,5592,5594,5596,5598,
+			5600,5602,5604,5606,5608,5610,5612,5614,5616,5618,5620,5622,5624,5626,5628,5630,5632,5634,5636,5638,5640,5642,5644,5646,5648,5650,5652,5654,5656,5658,5660,5662,
+			5664,5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,5696,5698,5700,5702,5704,5706,5708,5710,5712,5714,5716,5718,5720,5722,5724,5726,
+			5728,5730,5732,5734,5736,5738,5740,5742,5744,5746,5748,5750,5752,5754,5756,5758,5760,5762,5764,5766,5768,5770,5772,5774,5776,5778,5780,5782,5784,5786,5788,5790,
+			5792,5794,5796,5798,5800,5802,5804,5806,5808,5810,5812,5814,5816,5818,5820,5822,5824,5826,5828,5830,5832,5834,5836,5838,5840,5842,5844,5846,5848,5850,5852,5854,
+			5856,5858,5860,5862,5864,5866,5868,5870,5872,5874,5876,5878,5880,5882,5884,5886,5888,5890,5892,5894,5896,5898,5900,5902,5904,5906,5908,5910,5912,5914,5916,5918,
+			5920,5922,5924,5926,5928,5930,5932,5934,5936,5938,5940,5942,5944,5946,5948,5950,5952,5954,5956,5958,5960,5962,5964,5966,5968,5970,5972,5974,5976,5978,5980,5982,
+			5984,5986,5988,5990,5992,5994,5996,5998,6000,6002,6004,6006,6008,6010,6012,6014,6016,6018,6020,6022,6024,6026,6028,6030,6032,6034,6036,6038,6040,6042,6044,6046,
+			6048,6050,6052,6054,6056,6058,6060,6062,6064,6066,6068,6070,6072,6074,6076,6078,6080,6082,6084,6086,6088,6090,6092,6094,6096,6098,6100,6102,6104,6106,6108,6110,
+			6112,6114,6116,6118,6120,6122,6124,6126,6128,6130,6132,6134,6136,6138,6140,6142,6144,6146,6148,6150,6152,6154,6156,6158,6160,6162,6164,6166,6168,6170,6172,6174,
+			6176,6178,6180,6182,6184,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204,6206,6208,6210,6212,6214,6216,6218,6220,6222,6224,6226,6228,6230,6232,6234,6236,6238,
+			6240,6242,6244,6246,6248,6250,6252,6254,6256,6258,6260,6262,6264,6266,6268,6270,6272,6274,6276,6278,6280,6282,6284,6286,6288,6290,6292,6294,6296,6298,6300,6302,
+			6304,6306,6308,6310,6312,6314,6316,6318,6320,6322,6324,6326,6328,6330,6332,6334,6336,6338,6340,6342,6344,6346,6348,6350,6352,6354,6356,6358,6360,6362,6364,6366,
+			6368,6370,6372,6374,6376,6378,6380,6382,6384,6386,6388,6390,6392,6394,6396,6398,6400,6402,6404,6406,6408,6410,6412,6414,6416,6418,6420,6422,6424,6426,6428,6430,
+			6432,6434,6436,6438,6440,6442,6444,6446,6448,6450,6452,6454,6456,6458,6460,6462,6464,6466,6468,6470,6472,6474,6476,6478,6480,6482,6484,6486,6488,6490,6492,6494,
+			6496,6498,6500,6502,6504,6506,6508,6510,6512,6514,6516,6518,6520,6522,6524,6526,6528,6530,6532,6534,6536,6538,6540,6542,6544,6546,6548,6550,6552,6554,6556,6558,
+			6560,6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,6582,6584,6586,6588,6590,6592,6594,6596,6598,6600,6602,6604,6606,6608,6610,6612,6614,6616,6618,6620,6622,
+			6624,6626,6628,6630,6632,6634,6636,6638,6640,6642,6644,6646,6648,6650,6652,6654,6656,6658,6660,6662,6664,6666,6668,6670,6672,6674,6676,6678,6680,6682,6684,6686,
+			6688,6690,6692,6694,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716,6718,6720,6722,6724,6726,6728,6730,6732,6734,6736,6738,6740,6742,6744,6746,6748,6750,
+			6752,6754,6756,6758,6760,6762,6764,6766,6768,6770,6772,6774,6776,6778,6780,6782,6784,6786,6788,6790,6792,6794,6796,6798,6800,6802,6804,6806,6808,6810,6812,6814,
+			6816,6818,6820,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840,6842,6844,6846,6848,6850,6852,6854,6856,6858,6860,6862,6864,6866,6868,6870,6872,6874,6876,6878,
+			6880,6882,6884,6886,6888,6890,6892,6894,6896,6898,6900,6902,6904,6906,6908,6910,6912,6914,6916,6918,6920,6922,6924,6926,6928,6930,6932,6934,6936,6938,6940,6942,
+			6944,6946,6948,6950,6952,6954,6956,6958,6960,6962,6964,6966,6968,6970,6972,6974,6976,6978,6980,6982,6984,6986,6988,6990,6992,6994,6996,6998,7000,7002,7004,7006,
+			7008,7010,7012,7014,7016,7018,7020,7022,7024,7026,7028,7030,7032,7034,7036,7038,7040,7042,7044,7046,7048,7050,7052,7054,7056,7058,7060,7062,7064,7066,7068,7070,
+			7072,7074,7076,7078,7080,7082,7084,7086,7088,7090,7092,7094,7096,7098,7100,7102,7104,7106,7108,7110,7112,7114,7116,7118,7120,7122,7124,7126,7128,7130,7132,7134,
+			7136,7138,7140,7142,7144,7146,7148,7150,7152,7154,7156,7158,7160,7162,7164,7166,7168,7170,7172,7174,7176,7178,7180,7182,7184,7186,7188,7190,7192,7194,7196,7198,
+			7200,7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,7228,7230,7232,7234,7236,7238,7240,7242,7244,7246,7248,7250,7252,7254,7256,7258,7260,7262,
+			7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,7318,7320,7322,7324,7326,
+			7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7372,7374,7376,7378,7380,7382,7384,7386,7388,7390,
+			7392,7394,7396,7398,7400,7402,7404,7406,7408,7410,7412,7414,7416,7418,7420,7422,7424,7426,7428,7430,7432,7434,7436,7438,7440,7442,7444,7446,7448,7450,7452,7454,
+			7456,7458,7460,7462,7464,7466,7468,7470,7472,7474,7476,7478,7480,7482,7484,7486,7488,7490,7492,7494,7496,7498,7500,7502,7504,7506,7508,7510,7512,7514,7516,7518,
+			7520,7522,7524,7526,7528,7530,7532,7534,7536,7538,7540,7542,7544,7546,7548,7550,7552,7554,7556,7558,7560,7562,7564,7566,7568,7570,7572,7574,7576,7578,7580,7582,
+			7584,7586,7588,7590,7592,7594,7596,7598,7600,7602,7604,7606,7608,7610,7612,7614,7616,7618,7620,7622,7624,7626,7628,7630,7632,7634,7636,7638,7640,7642,7644,7646,
+			7648,7650,7652,7654,7656,7658,7660,7662,7664,7666,7668,7670,7672,7674,7676,7678,7680,7682,7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708
+		},
+		{
+			7229,7227,7225,7223,7221,7219,7217,7215,7213,7211,7209,7207,7205,7203,7201,7199,7197,7195,7193,7191,7189,7187,7185,7183,7181,7179,7177,7175,7173,7171,7169,7167,
+			7165,7163,7161,7159,7157,7155,7153,7151,7149,7147,7145,7143,7141,7139,7137,7135,7133,7131,7129,7127,7125,7123,7121,7119,7117,7115,7113,7111,7109,7107,7105,7103,
+			7101,7099,7097,7095,7093,7091,7089,7087,7085,7083,7081,7079,7077,7075,7073,7071,7069,7067,7065,7063,7061,7059,7057,7055,7053,7051,7049,7047,7045,7043,7041,7039,
+			7037,7035,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,7007,7005,7003,7001,6999,6997,6995,6993,6991,6989,6987,6985,6983,6981,6979,6977,6975,
+			6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,6947,6945,6943,6941,6939,6937,6935,6933,6931,6929,6927,6925,6923,6921,6919,6917,6915,6913,6911,
+			6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,6887,6885,6883,6881,6879,6877,6875,6873,6871,6869,6867,6865,6863,6861,6859,6857,6855,6853,6851,6849,6847,
+			6845,6843,6841,6839,6837,6835,6833,6831,6829,6827,6825,6823,6821,6819,6817,6815,6813,6811,6809,6807,6805,6803,6801,6799,6797,6795,6793,6791,6789,6787,6785,6783,
+			6781,6779,6777,6775,6773,6771,6769,6767,6765,6763,6761,6759,6757,6755,6753,6751,6749,6747,6745,6743,6741,6739,6737,6735,6733,6731,6729,6727,6725,6723,6721,6719,
+			6717,6715,6713,6711,6709,6707,6705,6703,6701,6699,6697,6695,6693,6691,6689,6687,6685,6683,6681,6679,6677,6675,6673,6671,6669,6667,6665,6663,6661,6659,6657,6655,
+			6653,6651,6649,6647,6645,6643,6641,6639,6637,6635,6633,6631,6629,6627,6625,6623,6621,6619,6617,6615,6613,6611,6609,6607,6605,6603,6601,6599,6597,6595,6593,6591,
+			6589,6587,6585,6583,6581,6579,6577,6575,6573,6571,6569,6567,6565,6563,6561,6559,6557,6555,6553,6551,6549,6547,6545,6543,6541,6539,6537,6535,6533,6531,6529,6527,
+			6525,6523,6521,6519,6517,6515,6513,6511,6509,6507,6505,6503,6501,6499,6497,6495,6493,6491,6489,6487,6485,6483,6481,6479,6477,6475,6473,6471,6469,6467,6465,6463,
+			6461,6459,6457,6455,6453,6451,6449,6447,6445,6443,6441,6439,6437,6435,6433,6431,6429,6427,6425,6423,6421,6419,6417,6415,6413,6411,6409,6407,6405,6403,6401,6399,
+			6397,6395,6393,6391,6389,6387,6385,6383,6381,6379,6377,6375,6373,6371,6369,6367,6365,6363,6361,6359,6357,6355,6353,6351,6349,6347,6345,6343,6341,6339,6337,6335,
+			6333,6331,6329,6327,6325,6323,6321,6319,6317,6315,6313,6311,6309,6307,6305,6303,6301,6299,6297,6295,6293,6291,6289,6287,6285,6283,6281,6279,6277,6275,6273,6271,
+			6269,6267,6265,6263,6261,6259,6257,6255,6253,6251,6249,6247,6245,6243,6241,6239,6237,6235,6233,6231,6229,6227,6225,6223,6221,6219,6217,6215,6213,6211,6209,6207,
+			6205,6203,6201,6199,6197,6195,6193,6191,6189,6187,6185,6183,6181,6179,6177,6175,6173,6171,6169,6167,6165,6163,6161,6159,6157,6155,6153,6151,6149,6147,6145,6143,
+			6141,6139,6137,6135,6133,6131,6129,6127,6125,6123,6121,6119,6117,6115,6113,6111,6109,6107,6105,6103,6101,6099,6097,6095,6093,6091,6089,6087,6085,6083,6081,6079,
+			6077,6075,6073,6071,6069,6067,6065,6063,6061,6059,6057,6055,6053,6051,6049,6047,6045,6043,6041,6039,6037,6035,6033,6031,6029,6027,6025,6023,6021,6019,6017,6015,
+			6013,6011,6009,6007,6005,6003,6001,5999,5997,5995,5993,5991,5989,5987,5985,5983,5981,5979,5977,5975,5973,5971,5969,5967,5965,5963,5961,5959,5957,5955,5953,5951,
+			5949,5947,5945,5943,5941,5939,5937,5935,5933,5931,5929,5927,5925,5923,5921,5919,5917,5915,5913,5911,5909,5907,5905,5903,5901,5899,5897,5895,5893,5891,5889,5887,
+			5885,5883,5881,5879,5877,5875,5873,5871,5869,5867,5865,5863,5861,5859,5857,5855,5853,5851,5849,5847,5845,5843,5841,5839,5837,5835,5833,5831,5829,5827,5825,5823,
+			5821,5819,5817,5815,5813,5811,5809,5807,5805,5803,5801,5799,5797,5795,5793,5791,5789,5787,5785,5783,5781,5779,5777,5775,5773,5771,5769,5767,5765,5763,5761,5759,
+			5757,5755,5753,5751,5749,5747,5745,5743,5741,5739,5737,5735,5733,5731,5729,5727,5725,5723,5721,5719,5717,5715,5713,5711,5709,5707,5705,5703,5701,5699,5697,5695,
+			5693,5691,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,5663,5661,5659,5657,5655,5653,5651,5649,5647,5645,5643,5641,5639,5637,5635,5633,5631,
+			5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,5599,5597,5595,5593,5591,5589,5587,5585,5583,5581,5579,5577,5575,5573,5571,5569,5567,
+			5565,5563,5561,5559,5557,5555,5553,5551,5549,5547,5545,5543,5541,5539,5537,5535,5533,5531,5529,5527,5525,5523,5521,5519,5517,5515,5513,5511,5509,5507,5505,5503,
+			5501,5499,5497,5495,5493,5491,5489,5487,5485,5483,5481,5479,5477,5475,5473,5471,5469,5467,5465,5463,5461,5459,5457,5455,5453,5451,5449,5447,5445,5443,5441,5439,
+			5437,5435,5433,5431,5429,5427,5425,5423,5421,5419,5417,5415,5413,5411,5409,5407,5405,5403,5401,5399,5397,5395,5393,5391,5389,5387,5385,5383,5381,5379,5377,5375,
+			5373,5371,5369,5367,5365,5363,5361,5359,5357,5355,5353,5351,5349,5347,5345,5343,5341,5339,5337,5335,5333,5331,5329,5327,5325,5323,5321,5319,5317,5315,5313,5311,
+			5309,5307,5305,5303,5301,5299,5297,5295,5293,5291,5289,5287,5285,5283,5281,5279,5277,5275,5273,5271,5269,5267,5265,5263,5261,5259,5257,5255,5253,5251,5249,5247,
+			5245,5243,5241,5239,5237,5235,5233,5231,5229,5227,5225,5223,5221,5219,5217,5215,5213,5211,5209,5207,5205,5203,5201,5199,5197,5195,5193,5191,5189,5187,5185,5183,
+			5181,5179,5177,5175,5173,5171,5169,5167,5165,5163,5161,5159,5157,5155,5153,5151,5149,5147,5145,5143,5141,5139,5137,5135,5133,5131,5129,5127,5125,5123,5121,5119,
+			5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,5093,5091,5089,5087,5085,5083,5081,5079,5077,5075,5073,5071,5069,5067,5065,5063,5061,5059,5057,5055,
+			5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,5033,5031,5029,5027,5025,5023,5021,5019,5017,5015,5013,5011,5009,5007,5005,5003,5001,4999,4997,4995,4993,4991,
+			4989,4987,4985,4983,4981,4979,4977,4975,4973,4971,4969,4967,4965,4963,4961,4959,4957,4955,4953,4951,4949,4947,4945,4943,4941,4939,4937,4935,4933,4931,4929,4927,
+			4925,4923,4921,4919,4917,4915,4913,4911,4909,4907,4905,4903,4901,4899,4897,4895,4893,4891,4889,4887,4885,4883,4881,4879,4877,4875,4873,4871,4869,4867,4865,4863,
+			4861,4859,4857,4855,4853,4851,4849,4847,4845,4843,4841,4839,4837,4835,4833,4831,4829,4827,4825,4823,4821,4819,4817,4815,4813,4811,4809,4807,4805,4803,4801,4799,
+			4797,4795,4793,4791,4789,4787,4785,4783,4781,4779,4777,4775,4773,4771,4769,4767,4765,4763,4761,4759,4757,4755,4753,4751,4749,4747,4745,4743,4741,4739,4737,4735,
+			4733,4731,4729,4727,4725,4723,4721,4719,4717,4715,4713,4711,4709,4707,4705,4703,4701,4699,4697,4695,4693,4691,4689,4687,4685,4683,4681,4679,4677,4675,4673,4671,
+			4669,4667,4665,4663,4661,4659,4657,4655,4653,4651,4649,4647,4645,4643,4641,4639,4637,4635,4633,4631,4629,4627,4625,4623,4621,4619,4617,4615,4613,4611,4609,4607,
+			4605,4603,4601,4599,4597,4595,4593,4591,4589,4587,4585,4583,4581,4579,4577,4575,4573,4571,4569,4567,4565,4563,4561,4559,4557,4555,4553,4551,4549,4547,4545,4543,
+			4541,4539,4537,4535,4533,4531,4529,4527,4525,4523,4521,4519,4517,4515,4513,4511,4509,4507,4505,4503,4501,4499,4497,4495,4493,4491,4489,4487,4485,4483,4481,4479,
+			4477,4475,4473,4471,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,4447,4445,4443,4441,4439,4437,4435,4433,4431,4429,4427,4425,4423,4421,4419,4417,4415,
+			4413,4411,4409,4407,4405,4403,4401,4399,4397,4395,4393,4391,4389,4387,4385,4383,4381,4379,4377,4375,4373,4371,4369,4367,4365,4363,4361,4359,4357,4355,4353,4351,
+			4349,4347,4345,4343,4341,4339,4337,4335,4333,4331,4329,4327,4325,4323,4321,4319,4317,4315,4313,4311,4309,4307,4305,4303,4301,4299,4297,4295,4293,4291,4289,4287,
+			4285,4283,4281,4279,4277,4275,4273,4271,4269,4267,4265,4263,4261,4259,4257,4255,4253,4251,4249,4247,4245,4243,4241,4239,4237,4235,4233,4231,4229,4227,4225,4223,
+			4221,4219,4217,4215,4213,4211,4209,4207,4205,4203,4201,4199,4197,4195,4193,4191,4189,4187,4185,4183,4181,4179,4177,4175,4173,4171,4169,4167,4165,4163,4161,4159,
+			4157,4155,4153,4151,4149,4147,4145,4143,4141,4139,4137,4135,4133,4131,4129,4127,4125,4123,4121,4119,4117,4115,4113,4111,4109,4107,4105,4103,4101,4099,4097,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,127,
+			125,123,121,119,117,115,113,111,109,107,105,103,101,99,97,95,93,91,89,87,85,83,81,79,77,75,73,71,69,67,65,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
+			4096,4098,4100,4102,4104,4106,4108,4110,4112,4114,4116,4118,4120,4122,4124,4126,4128,4130,4132,4134,4136,4138,4140,4142,4144,4146,4148,4150,4152,4154,4156,4158,
+			4160,4162,4164,4166,4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,4192,4194,4196,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,
+			4224,4226,4228,4230,4232,4234,4236,4238,4240,4242,4244,4246,4248,4250,4252,4254,4256,4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,
+			4288,4290,4292,4294,4296,4298,4300,4302,4304,4306,4308,4310,4312,4314,4316,4318,4320,4322,4324,4326,4328,4330,4332,4334,4336,4338,4340,4342,4344,4346,4348,4350,
+			4352,4354,4356,4358,4360,4362,4364,4366,4368,4370,4372,4374,4376,4378,4380,4382,4384,4386,4388,4390,4392,4394,4396,4398,4400,4402,4404,4406,4408,4410,4412,4414,
+			4416,4418,4420,4422,4424,4426,4428,4430,4432,4434,4436,4438,4440,4442,4444,4446,4448,4450,4452,4454,4456,4458,4460,4462,4464,4466,4468,4470,4472,4474,4476,4478,
+			4480,4482,4484,4486,4488,4490,4492,4494,4496,4498,4500,4502,4504,4506,4508,4510,4512,4514,4516,4518,4520,4522,4524,4526,4528,4530,4532,4534,4536,4538,4540,4542,
+			4544,4546,4548,4550,4552,4554,4556,4558,4560,4562,4564,4566,4568,4570,4572,4574,4576,4578,4580,4582,4584,4586,4588,4590,4592,4594,4596,4598,4600,4602,4604,4606,
+			4608,4610,4612,4614,4616,4618,4620,4622,4624,4626,4628,4630,4632,4634,4636,4638,4640,4642,4644,4646,4648,4650,4652,4654,4656,4658,4660,4662,4664,4666,4668,4670,
+			4672,4674,4676,4678,4680,4682,4684,4686,4688,4690,4692,4694,4696,4698,4700,4702,4704,4706,4708,4710,4712,4714,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,
+			4736,4738,4740,4742,4744,4746,4748,4750,4752,4754,4756,4758,4760,4762,4764,4766,4768,4770,4772,4774,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,
+			4800,4802,4804,4806,4808,4810,4812,4814,4816,4818,4820,4822,4824,4826,4828,4830,4832,4834,4836,4838,4840,4842,4844,4846,4848,4850,4852,4854,4856,4858,4860,4862,
+			4864,4866,4868,4870,4872,4874,4876,4878,4880,4882,4884,4886,4888,4890,4892,4894,4896,4898,4900,4902,4904,4906,4908,4910,4912,4914,4916,4918,4920,4922,4924,4926,
+			4928,4930,4932,4934,4936,4938,4940,4942,4944,4946,4948,4950,4952,4954,4956,4958,4960,4962,4964,4966,4968,4970,4972,4974,4976,4978,4980,4982,4984,4986,4988,4990,
+			4992,4994,4996,4998,5000,5002,5004,5006,5008,5010,5012,5014,5016,5018,5020,5022,5024,5026,5028,5030,5032,5034,5036,5038,5040,5042,5044,5046,5048,5050,5052,5054,
+			5056,5058,5060,5062,5064,5066,5068,5070,5072,5074,5076,5078,5080,5082,5084,5086,5088,5090,5092,5094,5096,5098,5100,5102,5104,5106,5108,5110,5112,5114,5116,5118,
+			5120,5122,5124,5126,5128,5130,5132,5134,5136,5138,5140,5142,5144,5146,5148,5150,5152,5154,5156,5158,5160,5162,5164,5166,5168,5170,5172,5174,5176,5178,5180,5182,
+			5184,5186,5188,5190,5192,5194,5196,5198,5200,5202,5204,5206,5208,5210,5212,5214,5216,5218,5220,5222,5224,5226,5228,5230,5232,5234,5236,5238,5240,5242,5244,5246,
+			5248,5250,5252,5254,5256,5258,5260,5262,5264,5266,5268,5270,5272,5274,5276,5278,5280,5282,5284,5286,5288,5290,5292,5294,5296,5298,5300,5302,5304,5306,5308,5310,
+			5312,5314,5316,5318,5320,5322,5324,5326,5328,5330,5332,5334,5336,5338,5340,5342,5344,5346,5348,5350,5352,5354,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,
+			5376,5378,5380,5382,5384,5386,5388,5390,5392,5394,5396,5398,5400,5402,5404,5406,5408,5410,5412,5414,5416,5418,5420,5422,5424,5426,5428,5430,5432,5434,5436,5438,
+			5440,5442,5444,5446,5448,5450,5452,5454,5456,5458,5460,5462,5464,5466,5468,5470,5472,5474,5476,5478,5480,5482,5484,5486,5488,5490,5492,5494,5496,5498,5500,5502,
+			5504,5506,5508,5510,5512,5514,5516,5518,5520,5522,5524,5526,5528,5530,5532,5534,5536,5538,5540,5542,5544,5546,5548,5550,5552,5554,5556,5558,5560,5562,5564,5566,
+			5568,5570,5572,5574,5576,5578,5580,5582,5584,5586,5588,5590,5592,5594,5596,5598,5600,5602,5604,5606,5608,5610,5612,5614,5616,5618,5620,5622,5624,5626,5628,5630,
+			5632,5634,5636,5638,5640,5642,5644,5646,5648,5650,5652,5654,5656,5658,5660,5662,5664,5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5692,5694,
+			5696,5698,5700,5702,5704,5706,5708,5710,5712,5714,5716,5718,5720,5722,5724,5726,5728,5730,5732,5734,5736,5738,5740,5742,5744,5746,5748,5750,5752,5754,5756,5758,
+			5760,5762,5764,5766,5768,5770,5772,5774,5776,5778,5780,5782,5784,5786,5788,5790,5792,5794,5796,5798,5800,5802,5804,5806,5808,5810,5812,5814,5816,5818,5820,5822,
+			5824,5826,5828,5830,5832,5834,5836,5838,5840,5842,5844,5846,5848,5850,5852,5854,5856,5858,5860,5862,5864,5866,5868,5870,5872,5874,5876,5878,5880,5882,5884,5886,
+			5888,5890,5892,5894,5896,5898,5900,5902,5904,5906,5908,5910,5912,5914,5916,5918,5920,5922,5924,5926,5928,5930,5932,5934,5936,5938,5940,5942,5944,5946,5948,5950,
+			5952,5954,5956,5958,5960,5962,5964,5966,5968,5970,5972,5974,5976,5978,5980,5982,5984,5986,5988,5990,5992,5994,5996,5998,6000,6002,6004,6006,6008,6010,6012,6014,
+			6016,6018,6020,6022,6024,6026,6028,6030,6032,6034,6036,6038,6040,6042,6044,6046,6048,6050,6052,6054,6056,6058,6060,6062,6064,6066,6068,6070,6072,6074,6076,6078,
+			6080,6082,6084,6086,6088,6090,6092,6094,6096,6098,6100,6102,6104,6106,6108,6110,6112,6114,6116,6118,6120,6122,6124,6126,6128,6130,6132,6134,6136,6138,6140,6142,
+			6144,6146,6148,6150,6152,6154,6156,6158,6160,6162,6164,6166,6168,6170,6172,6174,6176,6178,6180,6182,6184,6186,6188,6190,6192,6194,6196,6198,6200,6202,6204,6206,
+			6208,6210,6212,6214,6216,6218,6220,6222,6224,6226,6228,6230,6232,6234,6236,6238,6240,6242,6244,6246,6248,6250,6252,6254,6256,6258,6260,6262,6264,6266,6268,6270,
+			6272,6274,6276,6278,6280,6282,6284,6286,6288,6290,6292,6294,6296,6298,6300,6302,6304,6306,6308,6310,6312,6314,6316,6318,6320,6322,6324,6326,6328,6330,6332,6334,
+			6336,6338,6340,6342,6344,6346,6348,6350,6352,6354,6356,6358,6360,6362,6364,6366,6368,6370,6372,6374,6376,6378,6380,6382,6384,6386,6388,6390,6392,6394,6396,6398,
+			6400,6402,6404,6406,6408,6410,6412,6414,6416,6418,6420,6422,6424,6426,6428,6430,6432,6434,6436,6438,6440,6442,6444,6446,6448,6450,6452,6454,6456,6458,6460,6462,
+			6464,6466,6468,6470,6472,6474,6476,6478,6480,6482,6484,6486,6488,6490,6492,6494,6496,6498,6500,6502,6504,6506,6508,6510,6512,6514,6516,6518,6520,6522,6524,6526,
+			6528,6530,6532,6534,6536,6538,6540,6542,6544,6546,6548,6550,6552,6554,6556,6558,6560,6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,6582,6584,6586,6588,6590,
+			6592,6594,6596,6598,6600,6602,6604,6606,6608,6610,6612,6614,6616,6618,6620,6622,6624,6626,6628,6630,6632,6634,6636,6638,6640,6642,6644,6646,6648,6650,6652,6654,
+			6656,6658,6660,6662,6664,6666,6668,6670,6672,6674,6676,6678,6680,6682,6684,6686,6688,6690,6692,6694,6696,6698,6700,6702,6704,6706,6708,6710,6712,6714,6716,6718,
+			6720,6722,6724,6726,6728,6730,6732,6734,6736,6738,6740,6742,6744,6746,6748,6750,6752,6754,6756,6758,6760,6762,6764,6766,6768,6770,6772,6774,6776,6778,6780,6782,
+			6784,6786,6788,6790,6792,6794,6796,6798,6800,6802,6804,6806,6808,6810,6812,6814,6816,6818,6820,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840,6842,6844,6846,
+			6848,6850,6852,6854,6856,6858,6860,6862,6864,6866,6868,6870,6872,6874,6876,6878,6880,6882,6884,6886,6888,6890,6892,6894,6896,6898,6900,6902,6904,6906,6908,6910,
+			6912,6914,6916,6918,6920,6922,6924,6926,6928,6930,6932,6934,6936,6938,6940,6942,6944,6946,6948,6950,6952,6954,6956,6958,6960,6962,6964,6966,6968,6970,6972,6974,
+			6976,6978,6980,6982,6984,6986,6988,6990,6992,6994,6996,6998,7000,7002,7004,7006,7008,7010,7012,7014,7016,7018,7020,7022,7024,7026,7028,7030,7032,7034,7036,7038,
+			7040,7042,7044,7046,7048,7050,7052,7054,7056,7058,7060,7062,7064,7066,7068,7070,7072,7074,7076,7078,7080,7082,7084,7086,7088,7090,7092,7094,7096,7098,7100,7102,
+			7104,7106,7108,7110,7112,7114,7116,7118,7120,7122,7124,7126,7128,7130,7132,7134,7136,7138,7140,7142,7144,7146,7148,7150,7152,7154,7156,7158,7160,7162,7164,7166,
+			7168,7170,7172,7174,7176,7178,7180,7182,7184,7186,7188,7190,7192,7194,7196,7198,7200,7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,7228
+		}
+	};
+	int index;
+	
+	// TODO: check coefficient levels for illegal values?
+	//       perhaps this can be removed later on?
+	//if (level > 2047)
+	//	level = 2047;
+	//else if (level < -2047)
+	//	level = -2047;
+	index = level+2047;
+	put_bits(b,length_table[vlcnum][index],code_table[vlcnum][index]);
+#ifdef DEBUG_H264CAVLC
+//	av_log(NULL, AV_LOG_DEBUG, "Encoded level with number %d\n",code_table[vlcnum][index]);	
+#endif 
+}
+
+static inline void h264cavlc_encode_vlc_totalzeros(PutBitContext *b, int vlcnum, int total_zeros)
+{
+	put_bits(b,total_zeros_len[vlcnum][total_zeros],total_zeros_bits[vlcnum][total_zeros]);
+}
+
+static inline void h264cavlc_encode_vlc_run(PutBitContext *b, int vlcnum, int runbefore)
+{
+	put_bits(b,run_len[vlcnum][runbefore],run_bits[vlcnum][runbefore]);
+}
+
+static inline void h264cavlc_encode_vlc_coefftoken(PutBitContext *b, int lookup_table, int total_coeffs, int trailing_ones)
+{
+	put_bits(b,coeff_token_len[lookup_table][trailing_ones+total_coeffs*4],coeff_token_bits[lookup_table][trailing_ones+total_coeffs*4]);
+}
+
+static inline void h264cavlc_encode_vlc_coefftoken_chromadc(PutBitContext *b, int total_coeffs, int trailing_ones)
+{
+	put_bits(b,chroma_dc_coeff_token_len[trailing_ones + total_coeffs * 4],chroma_dc_coeff_token_bits[trailing_ones + total_coeffs * 4]);
+}
+
+static inline void h264cavlc_encode_vlc_totalzeros_chromadc(PutBitContext *b, int vlcnum, int value)
+{
+	static const int length_table[15][16] = 
+	{
+		{ 1,2,3,3 },
+		{ 1,2,2 },
+		{ 1,1 }
+	};
+	
+	static const int code_table[15][16] = 
+	{
+		{ 1,1,1,0 },
+		{ 1,1,0 },
+		{ 1,0 }
+	};
+	
+	put_bits(b,length_table[vlcnum][value],code_table[vlcnum][value]);
+}
+
+static inline int h264cavlc_get_lookup_table(int na, int nb)
+{
+	int nc = 0;
+	int lookup_table;
+
+	if (na >= 0 && nb >= 0)
+	{
+		nc = na+nb+1;
+		nc >>= 1;
+	}
+	else 
+	{
+		if (na >= 0) // nB < 0
+			nc = na;
+		else if (nb >= 0) // nA < 0
+			nc = nb;
+	}
+
+	switch(nc)
+	{
+	case 0:
+	case 1:
+		lookup_table = 0;
+		break;
+	case 2:
+	case 3:
+		lookup_table = 1;
+		break;
+	case 4:
+	case 5:
+	case 6:
+	case 7:
+		lookup_table = 2;
+		break;
+	default:
+		lookup_table = 3;
+	}
+	return lookup_table;
+}
+
+int h264cavlc_encode(PutBitContext *b, int32_t *coefficients, int len, int na, int nb, int is_chroma_dc)
+{
+	static const int increment_vlcnum[6] = { 0, 3, 6, 12, 24, 48 };
+
+	int i, t;
+	int total_coeffs;
+	int trailing_ones;
+	int total_zeros;
+	int numlevels;
+	int32_t levels[256];
+	int32_t zeros[256];
+
+#ifdef DEBUG_H264CAVLC
+	for (i = 0 ; i < len ; i++)
+		av_log(NULL, AV_LOG_DEBUG, "%6d",coefficients[i]);
+	av_log(NULL, AV_LOG_DEBUG, "\n");
+#endif 
+
+	// Count traling ones, total non-zero coefficients and the number of non-trailing zeros
+
+	total_coeffs = 0;
+	trailing_ones = 0;
+	total_zeros = 0; // For now, we'll count the number of zeros at the end
+	for (i = 0 ; i < len ; i++)
+	{
+		int32_t val = coefficients[i];
+		if (val != 0)
+		{
+			levels[total_coeffs] = val;
+			zeros[total_coeffs] = total_zeros;
+			if (val == -1 || val == +1)
+				trailing_ones++;
+			else
+				trailing_ones = 0;
+			total_coeffs++;
+			total_zeros = 0;
+		}
+		else
+			total_zeros++;
+	}
+	if (trailing_ones > 3)
+		trailing_ones = 3;
+	
+	total_zeros = len - total_zeros - total_coeffs; // The actual value of zeros (except the zeros at the end)
+	numlevels = total_coeffs - trailing_ones;
+
+	// Encode coeff_token. This is different for Chroma DC values  
+	
+	if (!is_chroma_dc)
+	{	
+		int lookupTable = h264cavlc_get_lookup_table(na,nb);
+#ifdef DEBUG_H264CAVLC
+//		av_log(NULL, AV_LOG_DEBUG, "Luma: vlc=%d #c=%d #t1=%d\n", lookupTable, total_coeffs, trailing_ones);
+#endif 
+		h264cavlc_encode_vlc_coefftoken(b,lookupTable,total_coeffs,trailing_ones);
+	}
+	else
+	{
+#ifdef DEBUG_H264CAVLC
+//		av_log(NULL, AV_LOG_DEBUG, "Chroma: #c=%d #t1=%d\n", total_coeffs, trailing_ones);
+#endif 
+		h264cavlc_encode_vlc_coefftoken_chromadc(b,total_coeffs,trailing_ones);
+	}
+	if (total_coeffs == 0) // Only zeros here, nothing left to do
+		return 0;
+  
+	// Encode the trailing one sign bits
+	
+	for (i = total_coeffs-1, t = trailing_ones ; t > 0 ; i--, t--)
+	{
+		if (levels[i] > 0) // +1
+			put_bits(b,1,0);
+		else // -1
+			put_bits(b,1,1);
+	}
+	
+	// Encode levels of the remaining nonzero coefficients
+
+	if (numlevels > 0)
+	{
+		int level_two_or_higher = 1;
+		int firstlevel = 1;
+		int vlcnum;
+		
+		if (total_coeffs > 3 && trailing_ones == 3)
+			level_two_or_higher = 0;
+	
+		if (total_coeffs > 10 && trailing_ones < 3)
+			vlcnum = 1;
+		else
+			vlcnum = 0;
+	
+		for (i = numlevels-1 ; i >= 0 ; i--)
+		{
+			int32_t val = levels[i];
+			int level = val; // 'level' will contain the absolute value of 'val'
+	
+			if (level < 0)
+				level = -level;
+			if (level_two_or_higher)
+			{
+				if (val > 0)
+					val--;
+				else // < 0
+					val++;
+				level_two_or_higher = 0;
+			}
+			
+#ifdef DEBUG_H264CAVLC
+//			av_log(NULL, AV_LOG_DEBUG, "Encoding level %d with vlc %d\n",val,vlcnum);
+#endif 
+			h264cavlc_encode_vlc_level(b,vlcnum,val);
+			  
+			// update VLC table
+			if (vlcnum < 6 && level > increment_vlcnum[vlcnum])
+				vlcnum++;
+	
+			if (firstlevel)
+			{
+				firstlevel = 0;
+				if (level > 3)
+					vlcnum = 2;
+			}
+		}
+	}
+
+	// If necessary, encode the amount of non-trailing zeros
+	
+	if (total_coeffs < len)
+	{
+		int vlcnum = total_coeffs-1;
+		
+#ifdef DEBUG_H264CAVLC
+//		av_log(NULL, AV_LOG_DEBUG, "Encoding total_zeros %d with vlc %d\n",total_zeros,vlcnum);
+#endif 
+
+		if (!is_chroma_dc)
+			h264cavlc_encode_vlc_totalzeros(b,vlcnum,total_zeros);
+		else
+			h264cavlc_encode_vlc_totalzeros_chromadc(b,vlcnum,total_zeros);
+	}
+
+	// If necessary, encode the run_before values
+
+	for (i = total_coeffs-1 ; i > 0 && total_zeros > 0 ; i--)
+	{
+		int runbefore = zeros[i];
+		int vlcnum = total_zeros-1;
+		if (vlcnum > 6)
+			vlcnum = 6;
+	
+#ifdef DEBUG_H264CAVLC
+//		av_log(NULL, AV_LOG_DEBUG, "Encoding run %d with vlc %d\n",runbefore,vlcnum);
+#endif 
+	
+		h264cavlc_encode_vlc_run(b,vlcnum,runbefore);
+		total_zeros -= runbefore;
+	}
+
+	return total_coeffs;
+}
+
diff --git a/libavcodec/h264data.h b/libavcodec/h264data.h
index 3132102..d8c43da 100644
--- a/libavcodec/h264data.h
+++ b/libavcodec/h264data.h
@@ -51,6 +51,22 @@ #define DC_128_PRED8x8        6
 
 #define EXTENDED_SAR          255
 
+/* NAL unit types */
+#define NAL_SLICE                1
+#define NAL_DPA                  2
+#define NAL_DPB                  3
+#define NAL_DPC                  4
+#define NAL_IDR_SLICE            5
+#define NAL_SEI                  6
+#define NAL_SPS                  7
+#define NAL_PPS                  8
+#define NAL_AUD                  9
+#define NAL_END_SEQUENCE        10
+#define NAL_END_STREAM          11
+#define NAL_FILLER_DATA         12
+#define NAL_SPS_EXT             13
+#define NAL_AUXILIARY_SLICE     19
+
 static const AVRational pixel_aspect[14]={
  {0, 1},
  {1, 1},
diff --git a/libavcodec/h264enc.c b/libavcodec/h264enc.c
new file mode 100644
index 0000000..a854b7c
--- /dev/null
+++ b/libavcodec/h264enc.c
@@ -0,0 +1,2340 @@
+/*
+ * H.264 encoder
+ * Copyright (c) 2006 Expertisecentrum Digitale Media, UHasselt
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "common.h"
+#include "avcodec.h"
+#include "bitstream.h"
+#include "golomb.h"
+#include "mpegvideo.h"
+#include "h264data.h"
+#include "dsputil.h"
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#define DEFAULT_QP	30
+#define DISABLE_DEBLOCKING
+
+int h264cavlc_encode(PutBitContext *b, int32_t *coefficients, int len, int nA, int nB, int isChromaDC);
+void ff_h264_idct_add_c(uint8_t *dst, DCTELEM *block, int stride);
+
+/**
+ * Can contain pointers to the relevant starting points in a picture
+ */
+typedef struct _MacroBlock
+{
+	uint8_t *Y[16];
+	uint8_t *U[8];
+	uint8_t *V[8];
+	int Y_width;
+	int Y_height;
+	int Y_nonzero[4][4]; ///< y,x
+	int U_nonzero[2][2]; 
+	int V_nonzero[2][2];
+	struct _MacroBlock *leftblock,*topblock;
+	int available;
+} MacroBlock;
+
+typedef struct _Residual
+{
+	int32_t Y[16][16]; ///< y first, then x
+	int32_t U[8][8];
+	int32_t V[8][8];
+	int32_t *part4x4Y[4][4][4]; ///< ypos and xpos of 4x4 part, followed by y,x of pixel
+	int32_t *part4x4U[2][2][4]; ///< ypos and xpos of 4x4 part, followed by y,x of pixel
+	int32_t *part4x4V[2][2][4]; ///< ypos and xpos of 4x4 part, followed by y,x of pixel
+} Residual;
+
+typedef struct _FrameInfo
+{
+	AVPicture reconstructed_picture;
+	MacroBlock **reconstructed_mb_map; ///< macroblock map of reconstructed picture
+} FrameInfo;
+
+typedef struct _H264Context
+{
+	uint8_t *bitstream;
+	uint8_t *bytestream;
+	int bufsize;
+	int frame_num;
+	int IDR_frame_num;
+	MacroBlock **mb_map; ///< macroblock map for input picture
+	FrameInfo **reconstructed_frames;
+	int framebufsize; ///< length of previous array
+	int mb_width; ///< width in macroblocks
+	int mb_height; ///< height in macroblock
+	int QP;
+	int chroma_qp_index_offset;
+	int IDRcount;
+	int frame_cropping_flag;
+	int frame_crop_left_offset;
+	int frame_crop_right_offset;
+	int frame_crop_top_offset;
+	int frame_crop_bottom_offset;
+	
+	MpegEncContext s;
+	AVPicture pi, po;
+
+	DSPContext dspcontext;
+	int Y_stride;
+	int U_stride;
+	int V_stride;
+} H264Context;
+
+static void ff_h264_init_residual(Residual *r)
+{
+	int suby,subx,y;
+	
+	memset(r,0,sizeof(Residual));
+	for (suby = 0 ; suby < 4 ; suby++)
+	{
+		int suby4 = suby << 2;
+		for (subx = 0 ; subx < 4 ; subx++)
+		{
+			int subx4 = subx << 2;
+			for (y = 0 ; y < 4 ; y++)
+			{
+				r->part4x4Y[suby][subx][y] = &(r->Y[suby4+y][subx4]);	
+			}
+		}
+	}
+	
+	for (suby = 0 ; suby < 2 ; suby++)
+	{
+		int suby4 = suby << 2;
+		for (subx = 0 ; subx < 2 ; subx++)
+		{
+			int subx4 = subx << 2;
+			for (y = 0 ; y < 4 ; y++)
+			{
+				int ypos = suby4+y;
+				r->part4x4U[suby][subx][y] = &(r->U[ypos][subx4]);
+				r->part4x4V[suby][subx][y] = &(r->V[ypos][subx4]);
+			}
+		}
+	}
+}
+
+/**
+ * For a specific picture, this function sets the correct Y,U and V start addresses for each macroblock
+ */
+static void ff_h264_assign_macroblocks(AVPicture *p, MacroBlock **mb_map, int mb_width, int mb_height, int setneighbours)
+{
+	int y,x,i;
+	int Ylinesize = p->linesize[0];
+	int Ulinesize = p->linesize[1];
+	int Vlinesize = p->linesize[2];
+
+	if (!setneighbours)
+	{
+		for (y = 0 ; y < mb_height ; y++)
+		{
+			int y16 = y << 4;
+			int y8 = y << 3;
+			
+			for (x = 0 ; x < mb_width ; x++)
+			{
+				int x16 = x << 4;
+				int x8 = x << 3;
+				
+				for (i = 0 ; i < 8 ; i++)
+				{
+					int ypos = y8+i;
+					mb_map[y][x].U[i] = p->data[1]+(x8+ypos*Ulinesize);
+					mb_map[y][x].V[i] = p->data[2]+(x8+ypos*Vlinesize);
+				}
+				for (i = 0 ; i < 16 ; i++)
+					mb_map[y][x].Y[i] = p->data[0]+(x16+(y16+i)*Ylinesize);
+				
+				mb_map[y][x].topblock = NULL;
+				mb_map[y][x].leftblock = NULL;
+				mb_map[y][x].available = 0;
+			}
+		}
+	}
+	else
+	{
+		y = 0;
+		x = 0;
+		for (i = 0 ; i < 8 ; i++)
+		{
+			mb_map[y][x].U[i] = p->data[1]+((x<<3)+((y<<3)+i)*Ulinesize);
+			mb_map[y][x].V[i] = p->data[2]+((x<<3)+((y<<3)+i)*Vlinesize);
+		}
+		for (i = 0 ; i < 16 ; i++)
+			mb_map[y][x].Y[i] = p->data[0]+((x<<4)+((y<<4)+i)*Ylinesize);
+				
+		mb_map[y][x].topblock = NULL;
+		mb_map[y][x].leftblock = NULL;
+		mb_map[y][x].available = 0;
+		
+		y = 0;
+		for (x = 1 ; x < mb_width ; x++)
+		{
+			for (i = 0 ; i < 8 ; i++)
+			{
+				mb_map[y][x].U[i] = p->data[1]+((x<<3)+((y<<3)+i)*Ulinesize);
+				mb_map[y][x].V[i] = p->data[2]+((x<<3)+((y<<3)+i)*Vlinesize);
+			}
+			for (i = 0 ; i < 16 ; i++)
+				mb_map[y][x].Y[i] = p->data[0]+((x<<4)+((y<<4)+i)*Ylinesize);
+				
+			mb_map[y][x].topblock = NULL;
+			mb_map[y][x].leftblock = &(mb_map[y][x-1]);
+			mb_map[y][x].available = 0;
+		}
+		
+		x = 0;
+		for (y = 1 ; y < mb_height ; y++)
+		{		
+			for (i = 0 ; i < 8 ; i++)
+			{
+				mb_map[y][x].U[i] = p->data[1]+((x<<3)+((y<<3)+i)*Ulinesize);
+				mb_map[y][x].V[i] = p->data[2]+((x<<3)+((y<<3)+i)*Vlinesize);
+			}
+			for (i = 0 ; i < 16 ; i++)
+				mb_map[y][x].Y[i] = p->data[0]+((x<<4)+((y<<4)+i)*Ylinesize);
+				
+			mb_map[y][x].topblock = &(mb_map[y-1][x]);
+			mb_map[y][x].leftblock = NULL;
+			mb_map[y][x].available = 0;
+		}
+		
+		for (y = 1 ; y < mb_height ; y++)
+		{
+			for (x = 1 ; x < mb_width ; x++)
+			{
+				for (i = 0 ; i < 8 ; i++)
+				{
+					mb_map[y][x].U[i] = p->data[1]+((x<<3)+((y<<3)+i)*Ulinesize);
+					mb_map[y][x].V[i] = p->data[2]+((x<<3)+((y<<3)+i)*Vlinesize);
+				}
+				for (i = 0 ; i < 16 ; i++)
+					mb_map[y][x].Y[i] = p->data[0]+((x<<4)+((y<<4)+i)*Ylinesize);
+				
+				mb_map[y][x].topblock = &(mb_map[y-1][x]);
+				mb_map[y][x].leftblock = &(mb_map[y][x-1]);
+				mb_map[y][x].available = 0;
+			}
+		}
+	}
+}
+
+static void ff_h264_clear_nonzero_markers(MacroBlock **mb_map, int mb_width, int mb_height)
+{
+	int x,y;
+
+	for (y = 0 ; y < mb_height ; y++)
+	{
+		for (x = 0 ; x < mb_width ; x++)
+		{
+			// mark as not available
+
+			memset(&(mb_map[y][x].Y_nonzero[0][0]),0xff,sizeof(int)*16); // set to -1
+			memset(&(mb_map[y][x].U_nonzero[0][0]),0xff,sizeof(int)*4); // set to -1
+			memset(&(mb_map[y][x].V_nonzero[0][0]),0xff,sizeof(int)*4); // set to -1
+			
+			mb_map[y][x].available = 0;
+		}
+	}
+}
+
+static int ff_h264_encoder_init(AVCodecContext *avctx)
+{
+	H264Context *t = (H264Context *)avctx->priv_data;
+	uint8_t *buf;
+	int s,x,y,i;
+	int width, height;
+		
+	t->frame_cropping_flag = 0;	
+	t->frame_crop_left_offset = 0;
+	t->frame_crop_right_offset = 0;
+	t->frame_crop_top_offset = 0;
+	t->frame_crop_bottom_offset = 0;
+
+	width = avctx->width;
+	height = avctx->height;
+	av_log(avctx, AV_LOG_DEBUG, "width: %d height: %d wr: %d hr: %d mb_width: %d mb_height: %d \n", width, height,  width%16, height%16, t->mb_width, t->mb_height);
+	
+	t->mb_width = width/16;
+	t->mb_height = height/16;
+
+	if (( width % 16) !=0 )
+	{
+		t->frame_cropping_flag = 1;	
+		t->frame_crop_left_offset = 0;
+		t->frame_crop_right_offset = (width%16)/2;
+		t->mb_width++;
+	}
+
+	if (( height % 16) !=0 )
+	{
+		t->frame_cropping_flag = 1;	
+		t->frame_crop_top_offset = 0;
+		t->frame_crop_bottom_offset = (height%16)/2;
+		t->mb_height++;
+	}
+
+	width = t->mb_width * 16;
+	height = t->mb_height * 16;
+
+	av_log(avctx, AV_LOG_DEBUG, "frame cropping: %d left: %d right: %d top: %d bottom: %d\n", 
+		t->frame_cropping_flag,
+		t->frame_crop_left_offset,
+		t->frame_crop_right_offset,
+		t->frame_crop_top_offset,
+		t->frame_crop_bottom_offset);
+
+	s = avpicture_get_size(avctx->pix_fmt, width, height);
+	avpicture_alloc(&t->pi, avctx->pix_fmt, width, height);
+	avpicture_alloc(&t->po, avctx->pix_fmt, width, height);
+	
+	t->bitstream = (uint8_t *)t->pi.data[0];
+	t->bytestream = (uint8_t *)t->po.data[0];
+	t->bufsize = s*2;
+	t->frame_num = 0;
+	
+	
+	av_log(avctx, AV_LOG_DEBUG, "width: %d height: %d wr: %d hr: %d mb_width: %d mb_height: %d \n", width, height,  width%16, height%16, t->mb_width, t->mb_height);
+	
+	t->mb_map = (MacroBlock **)av_malloc(sizeof(MacroBlock*) * t->mb_height);
+	for (y = 0 ; y < t->mb_height ; y++)
+	{
+		t->mb_map[y] = (MacroBlock *)av_malloc(sizeof(MacroBlock) * t->mb_width);
+		for (x = 0 ; x < t->mb_width ; x++)
+		{
+			t->mb_map[y][x].Y_width = 16;
+			t->mb_map[y][x].Y_height = 16;
+		}
+	}
+
+	t->framebufsize = 16;
+	t->reconstructed_frames = (FrameInfo **)av_malloc(sizeof(FrameInfo *)*t->framebufsize);
+
+	for (i = 0 ; i < t->framebufsize ; i++)
+	{
+		t->reconstructed_frames[i] = (FrameInfo *)av_malloc(sizeof(FrameInfo));
+	
+		buf = (uint8_t *)av_malloc(s);
+		avpicture_fill(&(t->reconstructed_frames[i]->reconstructed_picture), buf, PIX_FMT_YUV420P, width, height);
+	
+		t->reconstructed_frames[i]->reconstructed_mb_map = (MacroBlock **)av_malloc(sizeof(MacroBlock*) * t->mb_height);
+		for (y = 0 ; y < t->mb_height ; y++)
+		{
+			t->reconstructed_frames[i]->reconstructed_mb_map[y] = (MacroBlock *)av_malloc(sizeof(MacroBlock) * t->mb_width);
+			for (x = 0 ; x < t->mb_width ; x++)
+			{
+				t->reconstructed_frames[i]->reconstructed_mb_map[y][x].Y_width = 16;
+				t->reconstructed_frames[i]->reconstructed_mb_map[y][x].Y_height = 16;
+			}
+		}
+		ff_h264_assign_macroblocks(&(t->reconstructed_frames[i]->reconstructed_picture),t->reconstructed_frames[i]->reconstructed_mb_map,t->mb_width,t->mb_height,1);
+	}
+
+	if (!avctx->global_quality)
+		t->QP = DEFAULT_QP;
+	else
+		t->QP = avctx->global_quality / FF_QP2LAMBDA;
+	t->chroma_qp_index_offset = 0;
+	t->IDRcount = 64;
+	t->IDR_frame_num = 0;
+
+	// init dsp
+	dsputil_init(&(t->dspcontext),avctx);
+	t->Y_stride = t->reconstructed_frames[0]->reconstructed_picture.linesize[0];
+	t->U_stride = t->reconstructed_frames[0]->reconstructed_picture.linesize[1];
+	t->V_stride = t->reconstructed_frames[0]->reconstructed_picture.linesize[2];
+
+	return 0; 
+}
+
+static uint8_t *ff_h264_write_nal_unit(int nal_ref_idc, int nal_unit_type, uint8_t *dest, int *destsize,
+		                  PutBitContext *b2)
+{
+	PutBitContext b;
+	int i, destpos, rbsplen;
+	uint8_t *rbsp;
+	
+	// Align b2 on a byte boundary
+	
+	align_put_bits(b2);
+	rbsplen = put_bits_count(b2)/8;
+	flush_put_bits(b2);
+	rbsp = b2->buf;
+	
+	init_put_bits(&b,dest,*destsize);
+	
+	put_bits(&b,16,0);
+	put_bits(&b,16,0x01);
+	
+	put_bits(&b,1,0); // forbidden zero bit 
+	put_bits(&b,2,nal_ref_idc); // nal_ref_idc
+	put_bits(&b,5,nal_unit_type); // nal_unit_type 
+	// TODO: nal_unit_type needs modification for enabling P-slices
+	// nal_unit_type 5 implies slice_type to be 2,4,7 or 9 (I-kind of slices)
+
+	flush_put_bits(&b);
+
+	destpos = 5;
+	
+	for (i = 0 ; i < rbsplen ; i++)
+	{
+		if (i + 2 < rbsplen && (rbsp[i] == 0 && rbsp[i+1] == 0 && rbsp[i+2] < 4))
+		{
+			dest[destpos++] = rbsp[i++];
+			dest[destpos++] = rbsp[i];
+			dest[destpos++] = 0x03; // emulation prevention byte
+		}
+		else
+			dest[destpos++] = rbsp[i];
+	}
+	
+	*destsize -= destpos;
+	return dest+destpos;
+}
+
+static void ff_h264_encode_I_PCM(MacroBlock *mb, PutBitContext *b, MacroBlock *copy_mb)
+{		
+	int w = mb->Y_width;
+	int h = mb->Y_height;
+	int x,y;
+	
+	set_ue_golomb(b, 25); // mb_type = I_PCM
+	align_put_bits(b);
+
+	// Y
+
+	for (y = 0 ; y < h ; y++)
+	{
+		for (x = 0 ; x < w ; x++)
+			put_bits(b,8,mb->Y[y][x]);
+		for ( ; x < 16 ; x++)
+			put_bits(b,8,0);
+	}
+	for ( ; y < 16 ; y++)
+	{
+		for (x = 0 ; x < 16 ; x++)
+			put_bits(b,8,0);
+	}
+	
+	// copy Y
+	
+	for (y = 0 ; y < h ; y++)
+		for (x = 0 ; x < w ; x++)
+			copy_mb->Y[y][x] = mb->Y[y][x];
+
+	w >>= 1;
+	h >>= 1;
+
+	// U
+	
+	for (y = 0 ; y < h ; y++)
+	{
+		for (x = 0 ; x < w ; x++)
+			put_bits(b,8,mb->U[y][x]);
+		for ( ; x < 8 ; x++)
+			put_bits(b,8,0);
+	}
+	for ( ; y < 8 ; y++)
+	{
+		for (x = 0 ; x < 8 ; x++)
+			put_bits(b,8,0);
+	}
+	
+	// V
+	
+	for (y = 0 ; y < h ; y++)
+	{
+		for (x = 0 ; x < w ; x++)
+			put_bits(b,8,mb->V[y][x]);
+		for ( ; x < 8 ; x++)
+			put_bits(b,8,0);
+	}
+	for ( ; y < 8 ; y++)
+	{
+		for (x = 0 ; x < 8 ; x++)
+			put_bits(b,8,0);
+	}
+
+	// copy U and V
+
+	for (y = 0 ; y < h ; y++)
+	{
+		for (x = 0 ; x < w ; x++)
+		{
+			copy_mb->U[y][x] = mb->U[y][x];
+			copy_mb->V[y][x] = mb->V[y][x];
+		}
+	}
+
+	// store the nonzero counts (set to 16 for I_PCM blocks)
+	
+	for (y = 0 ; y < 4 ; y++)
+	{
+		for (x = 0 ; x < 4 ; x++)
+		{
+			copy_mb->Y_nonzero[y][x] = 16;
+		}
+	}
+	for (y = 0 ; y < 2 ; y++)
+	{
+		for (x = 0 ; x < 2 ; x++)
+		{
+			copy_mb->U_nonzero[y][x] = 16;
+			copy_mb->V_nonzero[y][x] = 16;
+		}
+	}
+
+	copy_mb->available = 1;
+}
+
+static void ff_h264_transform_DCT(int32_t **block, int QP, int dontscaleDC) // y,x indexing
+{
+	int32_t pieces[4][4];
+	
+	static const int32_t MF[6][4][4] = 
+	{
+		{
+#define A 13107
+#define B 5243
+#define C 8066
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 11916
+#define B 4660
+#define C 7490
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 10082
+#define B 4194
+#define C 6554
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 9362
+#define B 3647
+#define C 5825
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 8192
+#define B 3355
+#define C 5243
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 7282
+#define B 2893
+#define C 4559
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+	};
+	int32_t tmpblock1[4][4];
+	int32_t qbits = 15 + QP/6;
+	int32_t f = (1<<qbits)/3; // TODO: different for inter encoding?
+	int mod = QP%6;
+	
+	pieces[0][0] = block[0][0]+block[0][1]+block[0][2]+block[0][3];
+	pieces[0][1] = block[1][0]+block[1][1]+block[1][2]+block[1][3];
+	pieces[0][2] = block[2][0]+block[2][1]+block[2][2]+block[2][3];
+	pieces[0][3] = block[3][0]+block[3][1]+block[3][2]+block[3][3];
+
+	pieces[1][0] = (block[0][0]<<1)+block[0][1]-block[0][2]-(block[0][3]<<1);
+	pieces[1][1] = (block[1][0]<<1)+block[1][1]-block[1][2]-(block[1][3]<<1);
+	pieces[1][2] = (block[2][0]<<1)+block[2][1]-block[2][2]-(block[2][3]<<1);
+	pieces[1][3] = (block[3][0]<<1)+block[3][1]-block[3][2]-(block[3][3]<<1);
+	
+	pieces[2][0] = block[0][0]-block[0][1]-block[0][2]+block[0][3];
+	pieces[2][1] = block[1][0]-block[1][1]-block[1][2]+block[1][3];
+	pieces[2][2] = block[2][0]-block[2][1]-block[2][2]+block[2][3];
+	pieces[2][3] = block[3][0]-block[3][1]-block[3][2]+block[3][3];
+
+	pieces[3][0] = block[0][0]-(block[0][1]<<1)+(block[0][2]<<1)-block[0][3];
+	pieces[3][1] = block[1][0]-(block[1][1]<<1)+(block[1][2]<<1)-block[1][3];
+	pieces[3][2] = block[2][0]-(block[2][1]<<1)+(block[2][2]<<1)-block[2][3];
+	pieces[3][3] = block[3][0]-(block[3][1]<<1)+(block[3][2]<<1)-block[3][3];
+	
+	tmpblock1[0][0] = pieces[0][0]+pieces[0][1]+pieces[0][2]+pieces[0][3];
+	tmpblock1[0][1] = pieces[1][0]+pieces[1][1]+pieces[1][2]+pieces[1][3];
+	tmpblock1[0][2] = pieces[2][0]+pieces[2][1]+pieces[2][2]+pieces[2][3];
+	tmpblock1[0][3] = pieces[3][0]+pieces[3][1]+pieces[3][2]+pieces[3][3];
+
+	tmpblock1[1][0] = (pieces[0][0] << 1)+pieces[0][1]-pieces[0][2]-(pieces[0][3]<<1);
+	tmpblock1[1][1] = (pieces[1][0] << 1)+pieces[1][1]-pieces[1][2]-(pieces[1][3]<<1);
+	tmpblock1[1][2] = (pieces[2][0] << 1)+pieces[2][1]-pieces[2][2]-(pieces[2][3]<<1);
+	tmpblock1[1][3] = (pieces[3][0] << 1)+pieces[3][1]-pieces[3][2]-(pieces[3][3]<<1);
+
+	tmpblock1[2][0] = pieces[0][0]-pieces[0][1]-pieces[0][2]+pieces[0][3];
+	tmpblock1[2][1] = pieces[1][0]-pieces[1][1]-pieces[1][2]+pieces[1][3];
+	tmpblock1[2][2] = pieces[2][0]-pieces[2][1]-pieces[2][2]+pieces[2][3];
+	tmpblock1[2][3] = pieces[3][0]-pieces[3][1]-pieces[3][2]+pieces[3][3];
+
+	tmpblock1[3][0] = pieces[0][0]-(pieces[0][1]<<1)+(pieces[0][2]<<1)-pieces[0][3];
+	tmpblock1[3][1] = pieces[1][0]-(pieces[1][1]<<1)+(pieces[1][2]<<1)-pieces[1][3];
+	tmpblock1[3][2] = pieces[2][0]-(pieces[2][1]<<1)+(pieces[2][2]<<1)-pieces[2][3];
+	tmpblock1[3][3] = pieces[3][0]-(pieces[3][1]<<1)+(pieces[3][2]<<1)-pieces[3][3];
+	
+	if (dontscaleDC)
+		block[0][0] = tmpblock1[0][0];
+	else
+		block[0][0] = ((ABS(tmpblock1[0][0])*MF[mod][0][0]+f) >> qbits)*(1-(((tmpblock1[0][0]&(1<<31))>>30)&2));
+	
+	block[0][1] = ((ABS(tmpblock1[0][1])*MF[mod][0][1]+f) >> qbits)*(1-(((tmpblock1[0][1]&(1<<31))>>30)&2));
+	block[0][2] = ((ABS(tmpblock1[0][2])*MF[mod][0][2]+f) >> qbits)*(1-(((tmpblock1[0][2]&(1<<31))>>30)&2));
+	block[0][3] = ((ABS(tmpblock1[0][3])*MF[mod][0][3]+f) >> qbits)*(1-(((tmpblock1[0][3]&(1<<31))>>30)&2));
+
+	block[1][0] = ((ABS(tmpblock1[1][0])*MF[mod][1][0]+f) >> qbits)*(1-(((tmpblock1[1][0]&(1<<31))>>30)&2));
+	block[1][1] = ((ABS(tmpblock1[1][1])*MF[mod][1][1]+f) >> qbits)*(1-(((tmpblock1[1][1]&(1<<31))>>30)&2));
+	block[1][2] = ((ABS(tmpblock1[1][2])*MF[mod][1][2]+f) >> qbits)*(1-(((tmpblock1[1][2]&(1<<31))>>30)&2));
+	block[1][3] = ((ABS(tmpblock1[1][3])*MF[mod][1][3]+f) >> qbits)*(1-(((tmpblock1[1][3]&(1<<31))>>30)&2));
+
+	block[2][0] = ((ABS(tmpblock1[2][0])*MF[mod][2][0]+f) >> qbits)*(1-(((tmpblock1[2][0]&(1<<31))>>30)&2));
+	block[2][1] = ((ABS(tmpblock1[2][1])*MF[mod][2][1]+f) >> qbits)*(1-(((tmpblock1[2][1]&(1<<31))>>30)&2));
+	block[2][2] = ((ABS(tmpblock1[2][2])*MF[mod][2][2]+f) >> qbits)*(1-(((tmpblock1[2][2]&(1<<31))>>30)&2));
+	block[2][3] = ((ABS(tmpblock1[2][3])*MF[mod][2][3]+f) >> qbits)*(1-(((tmpblock1[2][3]&(1<<31))>>30)&2));
+
+	block[3][0] = ((ABS(tmpblock1[3][0])*MF[mod][3][0]+f) >> qbits)*(1-(((tmpblock1[3][0]&(1<<31))>>30)&2));
+	block[3][1] = ((ABS(tmpblock1[3][1])*MF[mod][3][1]+f) >> qbits)*(1-(((tmpblock1[3][1]&(1<<31))>>30)&2));
+	block[3][2] = ((ABS(tmpblock1[3][2])*MF[mod][3][2]+f) >> qbits)*(1-(((tmpblock1[3][2]&(1<<31))>>30)&2));
+	block[3][3] = ((ABS(tmpblock1[3][3])*MF[mod][3][3]+f) >> qbits)*(1-(((tmpblock1[3][3]&(1<<31))>>30)&2));
+}
+
+static void ff_h264_transform_inverse_DCT_add(DSPContext *dspctx, int32_t **block, int QP, int dontscaleDC, uint8_t *dst, int stride) // y,x indexing
+{
+	static const int32_t V[6][4][4] = 
+	{
+		{
+#define A 10*16
+#define B 16*16
+#define C 13*16
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 11*16
+#define B 18*16
+#define C 14*16
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 13*16
+#define B 20*16
+#define C 16*16
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 14*16
+#define B 23*16
+#define C 18*16
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 16*16
+#define B 25*16
+#define C 20*16
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+		{
+#define A 18*16
+#define B 29*16
+#define C 23*16
+			{ A, C, A, C},
+			{ C, B, C, B},
+			{ A, C, A, C},
+			{ C, B, C, B},
+#undef A
+#undef B
+#undef C
+		},
+	};
+
+	DCTELEM elem[4][4];
+	int transpose = 0;
+	int mod = QP%6;
+	
+	if (dspctx->h264_idct_add != ff_h264_idct_add_c) // TODO: nasty stuff, aparently a transpose is needed in this case
+		transpose = 1;
+	
+	if (!transpose)
+	{
+		if (QP >= 24)
+		{
+			int shift = QP/6-4;
+			
+			if (dontscaleDC)
+				elem[0][0] = block[0][0];
+			else
+				elem[0][0] = (block[0][0]*V[QP%6][0][0]) << shift;
+			
+			elem[0][1] = (block[0][1]*V[mod][0][1]) << shift;
+			elem[0][2] = (block[0][2]*V[mod][0][2]) << shift;
+			elem[0][3] = (block[0][3]*V[mod][0][3]) << shift;
+			
+			elem[1][0] = (block[1][0]*V[mod][1][0]) << shift;
+			elem[1][1] = (block[1][1]*V[mod][1][1]) << shift;
+			elem[1][2] = (block[1][2]*V[mod][1][2]) << shift;
+			elem[1][3] = (block[1][3]*V[mod][1][3]) << shift;
+		
+			elem[2][0] = (block[2][0]*V[mod][2][0]) << shift;
+			elem[2][1] = (block[2][1]*V[mod][2][1]) << shift;
+			elem[2][2] = (block[2][2]*V[mod][2][2]) << shift;
+			elem[2][3] = (block[2][3]*V[mod][2][3]) << shift;
+	
+			elem[3][0] = (block[3][0]*V[mod][3][0]) << shift;
+			elem[3][1] = (block[3][1]*V[mod][3][1]) << shift;
+			elem[3][2] = (block[3][2]*V[mod][3][2]) << shift;
+			elem[3][3] = (block[3][3]*V[mod][3][3]) << shift;
+		}
+		else
+		{
+			int add = (1<<(3-QP/6));
+			int shift = (4-QP/6);
+			
+			if (dontscaleDC)
+				elem[0][0] = block[0][0];
+			else
+				elem[0][0] = (block[0][0]*V[mod][0][0]+add) >> shift;
+		
+			elem[0][1] = (block[0][1]*V[mod][0][1]+add) >> shift;
+			elem[0][2] = (block[0][2]*V[mod][0][2]+add) >> shift;
+			elem[0][3] = (block[0][3]*V[mod][0][3]+add) >> shift;
+	
+			elem[1][0] = (block[1][0]*V[mod][1][0]+add) >> shift;
+			elem[1][1] = (block[1][1]*V[mod][1][1]+add) >> shift;
+			elem[1][2] = (block[1][2]*V[mod][1][2]+add) >> shift;
+			elem[1][3] = (block[1][3]*V[mod][1][3]+add) >> shift;
+	
+			elem[2][0] = (block[2][0]*V[mod][2][0]+add) >> shift;
+			elem[2][1] = (block[2][1]*V[mod][2][1]+add) >> shift;
+			elem[2][2] = (block[2][2]*V[mod][2][2]+add) >> shift;
+			elem[2][3] = (block[2][3]*V[mod][2][3]+add) >> shift;
+	
+			elem[3][0] = (block[3][0]*V[mod][3][0]+add) >> shift;
+			elem[3][1] = (block[3][1]*V[mod][3][1]+add) >> shift;
+			elem[3][2] = (block[3][2]*V[mod][3][2]+add) >> shift;
+			elem[3][3] = (block[3][3]*V[mod][3][3]+add) >> shift;
+		}
+	}
+	else // transpose
+	{
+		if (QP >= 24)
+		{
+			int shift = QP/6-4;
+
+			if (dontscaleDC)
+				elem[0][0] = block[0][0];
+			else
+				elem[0][0] = (block[0][0]*V[mod][0][0]) << shift;
+			
+			elem[1][0] = (block[0][1]*V[mod][0][1]) << shift;
+			elem[2][0] = (block[0][2]*V[mod][0][2]) << shift;
+			elem[3][0] = (block[0][3]*V[mod][0][3]) << shift;
+			
+			elem[0][1] = (block[1][0]*V[mod][1][0]) << shift;
+			elem[1][1] = (block[1][1]*V[mod][1][1]) << shift;
+			elem[2][1] = (block[1][2]*V[mod][1][2]) << shift;
+			elem[3][1] = (block[1][3]*V[mod][1][3]) << shift;
+		
+			elem[0][2] = (block[2][0]*V[mod][2][0]) << shift;
+			elem[1][2] = (block[2][1]*V[mod][2][1]) << shift;
+			elem[2][2] = (block[2][2]*V[mod][2][2]) << shift;
+			elem[3][2] = (block[2][3]*V[mod][2][3]) << shift;
+	
+			elem[0][3] = (block[3][0]*V[mod][3][0]) << shift;
+			elem[1][3] = (block[3][1]*V[mod][3][1]) << shift;
+			elem[2][3] = (block[3][2]*V[mod][3][2]) << shift;
+			elem[3][3] = (block[3][3]*V[mod][3][3]) << shift;
+		}
+		else
+		{
+			int add = (1<<(3-QP/6));
+			int shift = (4-QP/6);
+
+			if (dontscaleDC)
+				elem[0][0] = block[0][0];
+			else
+				elem[0][0] = (block[0][0]*V[mod][0][0]+add) >> shift;
+		
+			elem[1][0] = (block[0][1]*V[mod][0][1]+add) >> shift;
+			elem[2][0] = (block[0][2]*V[mod][0][2]+add) >> shift;
+			elem[3][0] = (block[0][3]*V[mod][0][3]+add) >> shift;
+	
+			elem[0][1] = (block[1][0]*V[mod][1][0]+add) >> shift;
+			elem[1][1] = (block[1][1]*V[mod][1][1]+add) >> shift;
+			elem[2][1] = (block[1][2]*V[mod][1][2]+add) >> shift;
+			elem[3][1] = (block[1][3]*V[mod][1][3]+add) >> shift;
+	
+			elem[0][2] = (block[2][0]*V[mod][2][0]+add) >> shift;
+			elem[1][2] = (block[2][1]*V[mod][2][1]+add) >> shift;
+			elem[2][2] = (block[2][2]*V[mod][2][2]+add) >> shift;
+			elem[3][2] = (block[2][3]*V[mod][2][3]+add) >> shift;
+	
+			elem[0][3] = (block[3][0]*V[mod][3][0]+add) >> shift;
+			elem[1][3] = (block[3][1]*V[mod][3][1]+add) >> shift;
+			elem[2][3] = (block[3][2]*V[mod][3][2]+add) >> shift;
+			elem[3][3] = (block[3][3]*V[mod][3][3]+add) >> shift;
+		}
+	}
+
+	dspctx->h264_idct_add(dst,&(elem[0][0]),stride);
+}
+
+static void ff_h264_hadamard_mult_4x4(int32_t Y[4][4])
+{
+	int32_t pieces[4][4];
+	
+	pieces[0][0] = Y[0][0]+Y[0][1]+Y[0][2]+Y[0][3];
+	pieces[0][1] = Y[1][0]+Y[1][1]+Y[1][2]+Y[1][3];
+	pieces[0][2] = Y[2][0]+Y[2][1]+Y[2][2]+Y[2][3];
+	pieces[0][3] = Y[3][0]+Y[3][1]+Y[3][2]+Y[3][3];
+
+	pieces[1][0] = Y[0][0]+Y[0][1]-Y[0][2]-Y[0][3];
+	pieces[1][1] = Y[1][0]+Y[1][1]-Y[1][2]-Y[1][3];
+	pieces[1][2] = Y[2][0]+Y[2][1]-Y[2][2]-Y[2][3];
+	pieces[1][3] = Y[3][0]+Y[3][1]-Y[3][2]-Y[3][3];
+
+	pieces[2][0] = Y[0][0]-Y[0][1]-Y[0][2]+Y[0][3];
+	pieces[2][1] = Y[1][0]-Y[1][1]-Y[1][2]+Y[1][3];
+	pieces[2][2] = Y[2][0]-Y[2][1]-Y[2][2]+Y[2][3];
+	pieces[2][3] = Y[3][0]-Y[3][1]-Y[3][2]+Y[3][3];
+
+	pieces[3][0] = Y[0][0]-Y[0][1]+Y[0][2]-Y[0][3];
+	pieces[3][1] = Y[1][0]-Y[1][1]+Y[1][2]-Y[1][3];
+	pieces[3][2] = Y[2][0]-Y[2][1]+Y[2][2]-Y[2][3];
+	pieces[3][3] = Y[3][0]-Y[3][1]+Y[3][2]-Y[3][3];
+	
+	Y[0][0] = pieces[0][0]+pieces[0][1]+pieces[0][2]+pieces[0][3];
+	Y[0][1] = pieces[1][0]+pieces[1][1]+pieces[1][2]+pieces[1][3];
+	Y[0][2] = pieces[2][0]+pieces[2][1]+pieces[2][2]+pieces[2][3];
+	Y[0][3] = pieces[3][0]+pieces[3][1]+pieces[3][2]+pieces[3][3];
+
+	Y[1][0] = pieces[0][0]+pieces[0][1]-pieces[0][2]-pieces[0][3];
+	Y[1][1] = pieces[1][0]+pieces[1][1]-pieces[1][2]-pieces[1][3];
+	Y[1][2] = pieces[2][0]+pieces[2][1]-pieces[2][2]-pieces[2][3];
+	Y[1][3] = pieces[3][0]+pieces[3][1]-pieces[3][2]-pieces[3][3];
+
+	Y[2][0] = pieces[0][0]-pieces[0][1]-pieces[0][2]+pieces[0][3];
+	Y[2][1] = pieces[1][0]-pieces[1][1]-pieces[1][2]+pieces[1][3];
+	Y[2][2] = pieces[2][0]-pieces[2][1]-pieces[2][2]+pieces[2][3];
+	Y[2][3] = pieces[3][0]-pieces[3][1]-pieces[3][2]+pieces[3][3];
+
+	Y[3][0] = pieces[0][0]-pieces[0][1]+pieces[0][2]-pieces[0][3];
+	Y[3][1] = pieces[1][0]-pieces[1][1]+pieces[1][2]-pieces[1][3];
+	Y[3][2] = pieces[2][0]-pieces[2][1]+pieces[2][2]-pieces[2][3];
+	Y[3][3] = pieces[3][0]-pieces[3][1]+pieces[3][2]-pieces[3][3];
+}
+
+static const int32_t MF00[6] = {13107, 11916, 10082, 9362, 8192, 7282};
+
+/**
+ * |ZD(i,j)| = (|YD(i,j)| MF(0,0) + 2 f) >> (qbits + 1)
+ *
+ */
+
+static void ff_h264_hadamard_quant_4x4(int32_t Y[4][4], int QP)
+{
+	int32_t Z[4][4];
+	int i, j;
+	int qbits = 15 + QP/6;
+	int f = (1 << qbits) / 3; // for Intra blocks
+	static int once=0;
+
+
+	if(once==0)
+	{
+		av_log(NULL, AV_LOG_DEBUG, "QP in 4x4 Hadamard quant: %d\n", QP);
+		once++;
+	}
+
+	for (i = 0 ; i < 4 ; i++)
+		for (j = 0 ; j < 4 ; j++)
+			Z[i][j] = (abs(Y[i][j]/2) * MF00[QP%6] + 2*f) >> (qbits + 1);
+	
+	for (i = 0 ; i < 4 ; i++)
+		for (j = 0 ; j < 4 ; j++)
+			if (Y[i][j] < 0 )
+				Y[i][j] = Z[i][j] * -1;
+			else
+				Y[i][j] = Z[i][j];
+	
+//	av_log(NULL, AV_LOG_DEBUG, "Quantized DC coefficients\n");
+//	for (i = 0 ; i < 4 ; i++)
+//	{
+//		for (j = 0 ; j < 4 ; j++)
+//			av_log(NULL, AV_LOG_DEBUG, "%6d",Y[i][j]);
+//		av_log(NULL, AV_LOG_DEBUG, "\n");
+//	}
+//	av_log(NULL, AV_LOG_DEBUG, "\n");
+}
+
+static const int32_t V00[6] = {10*16, 11*16, 13*16, 14*16, 16*16, 18*16};
+
+
+/*
+ *
+ * Only if qpprime_y_zero_transform_bypass_flag == 0
+ */
+static void ff_h264_hadamard_invquant_4x4(int32_t Y[4][4], int QP)
+{
+	int i,j;
+	int qbits;
+	int f;
+	
+	if (QP < 36)
+	{
+		qbits = QP/6;
+		f = (1 << (5-qbits));
+		for (i = 0 ; i < 4 ; i++)
+			for (j = 0 ; j < 4 ; j++)
+				Y[i][j] = (Y[i][j] * V00[QP % 6] + f ) >> (6 - qbits);
+	}
+	else
+	{
+		qbits = QP/6 - 6;
+		for (i = 0 ; i < 4 ; i++)
+			for (j = 0 ; j < 4 ; j++)
+				Y[i][j] = (Y[i][j] * V00[QP % 6]) << qbits ;
+	}
+
+//	av_log(NULL, AV_LOG_DEBUG, "Reconstructed DC coefficients\n");
+//	for (i = 0 ; i < 4 ; i++)
+//	{
+//		for (j = 0 ; j < 4 ; j++)
+//			av_log(NULL, AV_LOG_DEBUG, "%6d",Y[i][j]);
+//		av_log(NULL, AV_LOG_DEBUG, "\n");
+//	}
+//	av_log(NULL, AV_LOG_DEBUG, "\n");
+//
+}
+
+static void ff_h264_hadamard_mult_2x2(int32_t Y[2][2])
+{
+	int32_t pieces[2][2];
+	
+	pieces[0][0] = Y[0][0]+Y[0][1];
+	pieces[0][1] = Y[1][0]+Y[1][1];
+	pieces[1][0] = Y[0][0]-Y[0][1];
+	pieces[1][1] = Y[1][0]-Y[1][1];
+	Y[0][0] = pieces[0][0]+pieces[0][1];
+	Y[0][1] = pieces[1][0]+pieces[1][1];
+	Y[1][0] = pieces[0][0]-pieces[0][1];
+	Y[1][1] = pieces[1][0]-pieces[1][1];
+}
+
+/**
+ * |ZD(i,j)| = (|YD(i,j)| MF(0,0) + 2 f) >> (qbits + 1)
+ *
+ */
+static void ff_h264_hadamard_quant_2x2(int32_t Y[2][2], int QP)
+{
+	int32_t Z[2][2];
+	int i, j;
+	int qbits = 15 + QP/6;
+	int f = (1 << qbits) / 3; // for Intra blocks 
+
+	for (i = 0 ; i < 2 ; i++)
+		for (j = 0 ; j < 2 ; j++)
+			Z[i][j] = (abs(Y[i][j]) * MF00[QP%6] + 2*f) >> (qbits+1);
+	
+	for (i = 0 ; i < 2 ; i++)
+		for (j = 0 ; j < 2 ; j++)
+			if (Y[i][j] < 0)
+				Y[i][j] = Z[i][j] * -1;
+			else
+				Y[i][j] = Z[i][j];
+}
+
+static void ff_h264_hadamard_invquant_2x2(int32_t Y[2][2], int QP)
+{
+	int i,j;
+
+	for (i = 0 ; i < 2 ; i++)
+		for (j = 0 ; j < 2 ; j++)
+			Y[i][j] = ((Y[i][j] * V00[QP % 6]) << (QP/6)) >> 5;
+
+}
+
+#define NEIGHBOUR_SUBTYPE_Y 0
+#define NEIGHBOUR_SUBTYPE_U 1
+#define NEIGHBOUR_SUBTYPE_V 2
+
+static inline void ff_h264_neighbour_count_nonzero(MacroBlock *mb, int type, int x, int y, int *nA, int *nB)
+{
+	if (type == NEIGHBOUR_SUBTYPE_Y) // Y
+	{
+		if (x == 0)
+		{
+			MacroBlock *leftmb = mb->leftblock;
+
+			if (!leftmb)
+				*nA = -1;
+			else
+				*nA = leftmb->Y_nonzero[y][3];
+		}
+		else
+			*nA = mb->Y_nonzero[y][x-1];
+
+		if (y == 0)
+		{
+			MacroBlock *topmb = mb->topblock;
+
+			if (!topmb)
+				*nB = -1;
+			else
+				*nB = topmb->Y_nonzero[3][x];
+		}
+		else
+			*nB = mb->Y_nonzero[y-1][x];
+	}
+	else if (type == NEIGHBOUR_SUBTYPE_U) // U
+	{
+		if (x == 0)
+		{
+			MacroBlock *leftmb = mb->leftblock;
+
+			if (!leftmb)
+				*nA = -1;
+			else
+				*nA = leftmb->U_nonzero[y][1];
+		}
+		else
+			*nA = mb->U_nonzero[y][x-1];
+
+		if (y == 0)
+		{
+			MacroBlock *topmb = mb->topblock;
+
+			if (!topmb)
+				*nB = -1;
+			else
+				*nB = topmb->U_nonzero[1][x];
+		}
+		else
+			*nB = mb->U_nonzero[y-1][x];
+	}
+	else // V
+	{
+		if (x == 0)
+		{
+			MacroBlock *leftmb = mb->leftblock;
+
+			if (!leftmb)
+				*nA = -1;
+			else
+				*nA = leftmb->V_nonzero[y][1];
+		}
+		else
+			*nA = mb->V_nonzero[y][x-1];
+
+		if (y == 0)
+		{
+			MacroBlock *topmb = mb->topblock;
+
+			if (!topmb)
+				*nB = -1;
+			else
+				*nB = topmb->V_nonzero[1][x];
+		}
+		else
+			*nB = mb->V_nonzero[y-1][x];
+	}
+}
+
+static const int zigzagx[16] = { 0,1,0,0,1,2,3,2,1,0,1,2,3,3,2,3 };
+static const int zigzagy[16] = { 0,0,1,2,1,0,0,1,2,3,3,2,1,2,3,3 };
+	
+static void ff_h264_encode_intra16x16_residual(PutBitContext *b,int32_t YD[4][4],int32_t UD[2][2],int32_t VD[2][2],
+						 Residual *residual, int lumamode, int chromamode, MacroBlock *mb)
+{	
+	int lumaACcount = 0;
+	int chromaDCcount = 0;
+	int chromaACcount = 0;
+	int CodedBlockPatternChroma = 0;
+	int CodedBlockPatternLuma = 0;
+	int x,y,i,j;
+	static const int mbtype_map[4][3][2] = 
+	{ 
+		{ 
+			{  1, 13 },  // 0 0 0, 0 0 1
+			{  5, 17 },  // 0 1 0, 0 1 1
+			{  9, 21 }   // 0 2 0, 0 2 1
+		}, 
+		{
+			{  2, 14 },  // 1 0 0, 1 0 1
+			{  6, 18 },  // 1 1 0, 1 1 1
+			{ 10, 22 }   // 1 2 0, 1 2 1
+		},
+		{
+			{  3, 15 },  // 2 0 0, 2 0 1
+			{  7, 19 },  // 2 1 0, 2 1 1
+			{ 11, 23 }   // 2 2 0, 2 2 1
+		},
+		{
+			{  4, 16 },  // 3 0 0, 3 0 1
+			{  8, 20 },  // 3 1 0, 3 1 1
+			{ 12, 24 }   // 3 2 0, 3 2 1
+		}
+	};
+	int32_t coefficients[256];				   
+	int nA,nB;
+	
+	for (y = 0 ; y < 16 ; y++)
+	{
+		for (x = 0 ; x < 16 ; x++)
+		{
+			if (!((x % 4) == 0 && (y % 4) == 0))
+			{
+				int32_t val = residual->Y[y][x];
+				if (val != 0)
+					lumaACcount++;
+				if (val > 2047)
+					residual->Y[y][x] = 2047;
+				else if (val < -2047)
+					residual->Y[y][x] = -2047;
+			}
+		}
+	}
+
+	for (y = 0 ; y < 8 ; y++)
+	{
+		for (x = 0 ; x < 8 ; x++)
+		{
+			if (!((x % 4) == 0 && (y % 4) == 0))
+			{
+				int32_t val1 = residual->U[y][x];
+				int32_t val2 = residual->V[y][x];
+				
+				if (val1 != 0)
+					chromaACcount++;
+				if (val2 != 0)
+					chromaACcount++;
+				if (val1 > 2047)
+					residual->U[y][x] = 2047;
+				else if (val1 < -2047)
+					residual->U[y][x] = -2047;
+				if (val2 > 2047)
+					residual->V[y][x] = 2047;
+				else if (val2 < -2047)
+					residual->V[y][x] = -2047;
+			}
+		}
+	}
+
+	for (y = 0 ; y < 2 ; y++)
+	{
+		for (x = 0 ; x < 2 ; x++)
+		{
+			int32_t val1 = UD[y][x];
+			int32_t val2 = VD[y][x];
+			
+			if (val1 != 0)
+				chromaDCcount++;
+			if (val2 != 0)
+				chromaDCcount++;
+
+			if (val1 > 2047)
+				UD[y][x] = 2047;
+			else if (val1 < -2047)
+				UD[y][x] = -2047;
+			if (val2 > 2047)
+				VD[y][x] = 2047;
+			else if (val2 < -2047)
+				VD[y][x] = -2047;
+		}
+	}
+
+	for (y = 0 ; y < 4 ; y++)
+	{
+		for (x = 0 ; x < 4 ; x++)
+		{
+			int32_t val = YD[y][x];
+
+			if (val > 2047)
+				YD[y][x] = 2047;
+			else if (val < -2047)
+				YD[y][x] = -2047;
+		}
+	}
+
+	if (chromaDCcount == 0)
+	{
+		if (chromaACcount == 0)
+			CodedBlockPatternChroma = 0;
+		else
+			CodedBlockPatternChroma = 2;
+	}
+	else
+	{
+		if (chromaACcount == 0)
+			CodedBlockPatternChroma = 1;
+		else
+			CodedBlockPatternChroma = 2;
+	}
+
+	if (lumaACcount == 0)
+		CodedBlockPatternLuma = 0;
+	else
+		CodedBlockPatternLuma = 1; // actually it is 15 in the ITU spec, but I'd like to use it as an array index
+
+	set_ue_golomb(b, mbtype_map[lumamode][CodedBlockPatternChroma][CodedBlockPatternLuma]); // mb_type
+	set_ue_golomb(b, chromamode); // intra_chroma_pred_mode
+	set_se_golomb(b, 0); // mb_qp_delta
+
+	// encode luma DC coefficients
+
+	ff_h264_neighbour_count_nonzero(mb,NEIGHBOUR_SUBTYPE_Y,0,0,&nA,&nB);
+	for (i = 0 ; i < 16 ; i++)
+		coefficients[i] = YD[zigzagy[i]][zigzagx[i]];
+	h264cavlc_encode(b,coefficients,16,nA,nB,0);
+
+	if (CodedBlockPatternLuma > 0)
+	{
+		for (j = 0 ; j < 4 ; j++)
+		{
+			int X = (j%2)*2;
+			int Y = (j/2)*2;
+			
+			for (i = 0 ; i < 4 ; i++)
+			{
+				int x = (i%2)+X;
+				int y = (i/2)+Y;
+				
+				int k;
+	
+				for (k = 0 ; k < 15 ; k++)
+					coefficients[k] = residual->part4x4Y[y][x][zigzagy[k+1]][zigzagx[k+1]];
+				ff_h264_neighbour_count_nonzero(mb,NEIGHBOUR_SUBTYPE_Y,x,y,&nA,&nB);
+				mb->Y_nonzero[y][x] = h264cavlc_encode(b,coefficients,15,nA,nB,0);
+			}
+		}
+	}
+	else
+	{
+		int x,y;
+
+		for (y = 0 ; y < 4 ; y++)
+			for (x = 0 ; x < 4 ; x++)
+				mb->Y_nonzero[y][x] = 0;
+	}
+	
+	if (CodedBlockPatternChroma == 0)
+	{
+		int x,y;
+
+		for (y = 0 ; y < 2 ; y++)
+		{
+			for (x = 0 ; x < 2 ; x++)
+			{
+				mb->U_nonzero[y][x] = 0;
+				mb->V_nonzero[y][x] = 0;
+			}
+		}
+		return;
+	}
+	
+	if (CodedBlockPatternChroma != 0)
+	{
+		coefficients[0] = UD[0][0];
+		coefficients[1] = UD[0][1];
+		coefficients[2] = UD[1][0];
+		coefficients[3] = UD[1][1];
+		h264cavlc_encode(b,coefficients,4,-1,-1,1); // nA and nB are not used in this case
+		
+		coefficients[0] = VD[0][0];
+		coefficients[1] = VD[0][1];
+		coefficients[2] = VD[1][0];
+		coefficients[3] = VD[1][1];
+		h264cavlc_encode(b,coefficients,4,-1,-1,1); // nA and nB are not used in this case
+	}
+	
+	if (CodedBlockPatternChroma == 2)
+	{
+		for (i = 0 ; i < 4 ; i++)
+		{
+			int x = (i%2);
+			int y = (i/2);
+				
+			int k;
+	
+			for (k = 0 ; k < 15 ; k++)
+				coefficients[k] = residual->part4x4U[y][x][zigzagy[k+1]][zigzagx[k+1]];
+			ff_h264_neighbour_count_nonzero(mb,NEIGHBOUR_SUBTYPE_U,x,y,&nA,&nB);
+			mb->U_nonzero[y][x] = h264cavlc_encode(b,coefficients,15,nA,nB,0);
+		}
+		
+		for (i = 0 ; i < 4 ; i++)
+		{
+			int x = (i%2);
+			int y = (i/2);
+				
+			int k;
+	
+			for (k = 0 ; k < 15 ; k++)
+				coefficients[k] = residual->part4x4V[y][x][zigzagy[k+1]][zigzagx[k+1]];
+			ff_h264_neighbour_count_nonzero(mb,NEIGHBOUR_SUBTYPE_V,x,y,&nA,&nB);
+			mb->V_nonzero[y][x] = h264cavlc_encode(b,coefficients,15,nA,nB,0);
+		}
+	}
+	else
+	{
+		int x,y;
+
+		for (y = 0 ; y < 2 ; y++)
+		{
+			for (x = 0 ; x < 2 ; x++)
+			{
+				mb->U_nonzero[y][x] = 0;
+				mb->V_nonzero[y][x] = 0;
+			}
+		}	
+	}
+}
+	
+static void ff_h264_encode_Intra_16x16(H264Context *t, MacroBlock *targetmb, PutBitContext *b,
+		                         MacroBlock *destmb)
+{
+	int x,y;
+	int w,h,w2,h2;
+	Residual residual;
+	int32_t YD[4][4];
+	int32_t UD[2][2];
+	int32_t VD[2][2];
+	int qPI;
+	int QPc;
+	int QPy = t->QP;
+	int lumapredmode = 2;
+	int chromapredmode = 0;
+	int leftavail = 0;
+	int topavail = 0;
+	
+	qPI = t->QP + t->chroma_qp_index_offset;
+	if (qPI < 0)
+		qPI = 0;
+	if (qPI > 51)
+		qPI = 51;
+	QPc = chroma_qp[qPI];
+	
+	w = targetmb->Y_width;
+	h = targetmb->Y_height;
+	w2 = w>>1;
+	h2 = h>>1;
+
+	if (destmb->leftblock != NULL && destmb->leftblock->available)
+		leftavail = 1;
+	if (destmb->topblock != NULL && destmb->topblock->available)
+		topavail = 1;
+
+	// TODO: use better strategy to determine intra16x16 encoding mode
+	
+	if (leftavail)
+	{
+		MacroBlock *srcleft = destmb->leftblock;
+		
+		if (topavail && w == 16 && h == 16 && srcleft->topblock != 0 && srcleft->topblock->available)
+		{
+			// Plane prediction
+			
+			MacroBlock *srctop = destmb->topblock;
+			MacroBlock *srctopleft = srcleft->topblock;
+			int32_t aY,bY,cY,HY,VY;
+			int32_t aU,bU,cU,HU,VU;
+			int32_t aV,bV,cV,HV,VV;
+			
+			// luma
+
+			HY = 0;
+			for (x = 0 ; x < 7 ; x++)
+				HY += (x+1)*(srctop->Y[15][8+x]-srctop->Y[15][6-x]);
+			HY += (7+1)*(srctop->Y[15][8+7]-srctopleft->Y[15][15]);
+
+			VY = 0;
+			for (y = 0 ; y < 7 ; y++)
+				VY += (y+1)*(srcleft->Y[8+y][15]-srcleft->Y[6-y][15]);
+			VY += (7+1)*(srcleft->Y[8+7][15]-srctopleft->Y[15][15]);
+			
+			aY = 16*(srcleft->Y[15][15]+srctop->Y[15][15]);
+			bY = (5*HY+32)>>6;
+			cY = (5*VY+32)>>6;
+
+			for (y = 0 ; y < 16 ; y++)
+			{
+				for (x = 0 ; x < 16 ; x++)
+				{
+					int32_t val;
+
+					val = (aY+bY*(x-7)+cY*(y-7)+16)>>5;
+					if (val < 0)
+						val = 0;
+					else if (val > 255)
+						val = 255;
+					destmb->Y[y][x] = (uint8_t)val;
+				}
+			}		
+
+			HU = 0;
+			for (x = 0 ; x < 3 ; x++)
+				HU += (x+1)*(srctop->U[7][4+x]-srctop->U[7][2-x]);
+			HU += (3+1)*(srctop->U[7][4+3]-srctopleft->U[7][7]);
+
+			VU = 0;
+			for (y = 0 ; y < 3 ; y++)
+				VU += (y+1)*(srcleft->U[4+y][7]-srcleft->U[2-y][7]);
+			VU += (3+1)*(srcleft->U[4+3][7]-srctopleft->U[7][7]);
+			
+			aU = 16*(srcleft->U[7][7]+srctop->U[7][7]);
+			bU = (34*HU+32)>>6;
+			cU = (34*VU+32)>>6;
+
+			for (y = 0 ; y < 8 ; y++)
+			{
+				for (x = 0 ; x < 8 ; x++)
+				{
+					int32_t val;
+
+					val = (aU+bU*(x-3)+cU*(y-3)+16)>>5;
+					if (val < 0)
+						val = 0;
+					else if (val > 255)
+						val = 255;
+					destmb->U[y][x] = (uint8_t)val;
+				}
+			}		
+
+			
+			HV = 0;
+			for (x = 0 ; x < 3 ; x++)
+				HV += (x+1)*(srctop->V[7][4+x]-srctop->V[7][2-x]);
+			HV += (3+1)*(srctop->V[7][4+3]-srctopleft->V[7][7]);
+
+			VV = 0;
+			for (y = 0 ; y < 3 ; y++)
+				VV += (y+1)*(srcleft->V[4+y][7]-srcleft->V[2-y][7]);
+			VV += (3+1)*(srcleft->V[4+3][7]-srctopleft->V[7][7]);
+			
+			aV = 16*(srcleft->V[7][7]+srctop->V[7][7]);
+			bV = (34*HV+32)>>6;
+			cV = (34*VV+32)>>6;
+
+			for (y = 0 ; y < 8 ; y++)
+			{
+				for (x = 0 ; x < 8 ; x++)
+				{
+					int32_t val;
+
+					val = (aV+bV*(x-3)+cV*(y-3)+16)>>5;
+					if (val < 0)
+						val = 0;
+					else if (val > 255)
+						val = 255;
+					destmb->V[y][x] = (uint8_t)val;
+				}
+			}		
+
+			lumapredmode = PLANE_PRED8x8;
+			chromapredmode = PLANE_PRED8x8;
+		}
+		else
+		{
+			// Horizontal prediction
+		
+			MacroBlock *srcmb = destmb->leftblock;    // this is from the picture which is being reconstructed
+			                                          // and which should be used for the prediction
+			for (y = 0 ; y < h ; y++)
+			{
+				uint8_t val = srcmb->Y[y][15];
+				for (x = 0 ; x < w ; x++)
+					destmb->Y[y][x] = val;
+			}
+			for (y = 0 ; y < h2 ; y++)
+			{
+				uint8_t val1 = srcmb->U[y][7];
+				uint8_t val2 = srcmb->V[y][7];
+				for (x = 0 ; x < w2 ; x++)
+				{
+					destmb->U[y][x] = val1;
+					destmb->V[y][x] = val2;
+				}
+			}
+			lumapredmode = HOR_PRED8x8;
+			chromapredmode = HOR_PRED8x8;
+		}
+	}
+	else // no left neighbour
+	{
+		if (topavail)
+		{
+			// Vertical prediction
+			
+			MacroBlock *srcmb = destmb->topblock;    // this is from the picture which is being reconstructed
+			                                         // and which should be used for the prediction
+	
+			for (x = 0 ; x < w ; x++)
+			{
+				uint8_t val = srcmb->Y[15][x];
+				for (y = 0 ; y < h ; y++)
+					destmb->Y[y][x] = val;
+			}
+			for (x = 0 ; x < w2 ; x++)
+			{
+				uint8_t val1 = srcmb->U[7][x];
+				uint8_t val2 = srcmb->V[7][x];
+				for (y = 0 ; y < h2 ; y++)
+				{
+					destmb->U[y][x] = val1;
+					destmb->V[y][x] = val2;
+				}
+			}
+			lumapredmode = VERT_PRED;
+			chromapredmode = VERT_PRED8x8;
+		}
+		else // nothing available, encode a standard DC block
+		{
+			for (x = 0 ; x < w ; x++)
+			{
+				for (y = 0 ; y < h ; y++)
+					destmb->Y[y][x] = (1<<7);
+			}
+			for (x = 0 ; x < w2 ; x++)
+			{
+				for (y = 0 ; y < h2 ; y++)
+				{
+					destmb->U[y][x] = (1<<7);
+					destmb->V[y][x] = (1<<7);
+				}
+			}
+			lumapredmode = DC_PRED;
+			chromapredmode = DC_PRED8x8;
+		}
+	}
+
+	// Calculate residual
+
+	ff_h264_init_residual(&residual);
+	
+	for (y = 0 ; y < h ; y++)
+	{
+		for (x = 0 ; x < w ; x++)
+			residual.Y[y][x] = (int32_t)targetmb->Y[y][x] - (int32_t)destmb->Y[y][x];
+	}	
+
+	for (y = 0 ; y < h2 ; y++)
+	{
+		for (x = 0 ; x < w2 ; x++)
+		{
+			residual.U[y][x] = (int32_t)targetmb->U[y][x] - (int32_t)destmb->U[y][x];
+			residual.V[y][x] = (int32_t)targetmb->V[y][x] - (int32_t)destmb->V[y][x];
+		}
+	}
+
+	// Transform residual: DCT
+
+	for (y = 0 ; y < 4 ; y++)
+	{
+		for (x = 0 ; x < 4 ; x++)
+		{
+			ff_h264_transform_DCT(residual.part4x4Y[y][x],QPy,1);
+		}
+	}
+	for (y = 0 ; y < 2 ; y++)
+	{
+		for (x = 0 ; x < 2 ; x++)
+		{
+			ff_h264_transform_DCT(residual.part4x4U[y][x],QPc,1);
+			ff_h264_transform_DCT(residual.part4x4V[y][x],QPc,1);
+		}
+	}
+
+	// Hadamard
+
+	// For luma
+	for (y = 0 ; y < 4 ; y++)
+		for (x = 0 ; x < 4 ; x++)
+			YD[y][x] = residual.part4x4Y[y][x][0][0];
+	
+//	av_log(NULL, AV_LOG_DEBUG, "Original DC coefficients\n");
+//	for (y = 0 ; y < 4 ; y++)
+//	{
+//		for (x = 0 ; x < 4 ; x++)
+//			av_log(NULL, AV_LOG_DEBUG, "%6d",YD[y][x]);
+//		av_log(NULL, AV_LOG_DEBUG, "\n");
+//	}
+//	av_log(NULL, AV_LOG_DEBUG, "\n");
+	
+	ff_h264_hadamard_mult_4x4(YD);
+	ff_h264_hadamard_quant_4x4(YD,QPy);
+
+	// For U
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			UD[y][x] = residual.part4x4U[y][x][0][0];
+	ff_h264_hadamard_mult_2x2(UD);
+	ff_h264_hadamard_quant_2x2(UD,QPc);
+  
+	// For V
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			VD[y][x] = residual.part4x4V[y][x][0][0];
+	ff_h264_hadamard_mult_2x2(VD);
+	ff_h264_hadamard_quant_2x2(VD,QPc);
+
+	// Encode macroblock 
+	
+	ff_h264_encode_intra16x16_residual(b,YD,UD,VD,&residual,lumapredmode,chromapredmode,destmb);
+	
+	// Inverse hadamard
+	
+	// For luma
+	ff_h264_hadamard_mult_4x4(YD);
+	ff_h264_hadamard_invquant_4x4(YD,QPy);
+	for (y = 0 ; y < 4 ; y++)
+		for (x = 0 ; x < 4 ; x++)
+			residual.part4x4Y[y][x][0][0] = YD[y][x];
+
+	// For U
+	ff_h264_hadamard_mult_2x2(UD);
+	ff_h264_hadamard_invquant_2x2(UD,QPc);
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			residual.part4x4U[y][x][0][0] = UD[y][x];
+	// For V
+	ff_h264_hadamard_mult_2x2(VD);
+	ff_h264_hadamard_invquant_2x2(VD,QPc);
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			residual.part4x4V[y][x][0][0] = VD[y][x];
+
+	// Inverse DCT and add
+	
+	for (y = 0 ; y < 4 ; y++)
+	{
+		for (x = 0 ; x < 4 ; x++)
+		{
+			ff_h264_transform_inverse_DCT_add(&(t->dspcontext),residual.part4x4Y[y][x],QPy,1,&(destmb->Y[y*4][x*4]),t->Y_stride);
+		}
+	}
+	for (y = 0 ; y < 2 ; y++)
+	{
+		for (x = 0 ; x < 2 ; x++)
+		{
+			ff_h264_transform_inverse_DCT_add(&(t->dspcontext),residual.part4x4U[y][x],QPc,1,&(destmb->U[y*4][x*4]),t->U_stride);
+			ff_h264_transform_inverse_DCT_add(&(t->dspcontext),residual.part4x4V[y][x],QPc,1,&(destmb->V[y*4][x*4]),t->V_stride);
+		}
+	}	
+	
+	destmb->available = 1;
+}
+
+static void ff_h264_encode_inter16x16_residual(PutBitContext *b,int mv_x,int mv_y,Residual *residual,
+						 int32_t UD[2][2],int32_t VD[2][2],int pred_frame_index,MacroBlock *mb)
+{
+	static const int me_map[] = { 0, 2, 3, 7, 4, 8,17,13, 5,18, 9,14,10,15,16,
+		                     11, 1,32,33,36,34,37,44,40,35,45,38,41,39,42,
+				     43,19, 6,24,25,20,26,21,46,28,27,47,22,29,23,
+				     30,31,12};
+	int coded_block_pattern;
+	int CodedBlockPatternLuma;
+	int CodedBlockPatternChroma;
+	int32_t coefficients[256];
+	int x,y,i,j;
+	int done;
+	int chromaACcount;
+	int chromaDCcount;
+	int nA,nB;
+	
+	// TODO: take mv_x, mv_y and pred_frame_index into account
+	
+	set_ue_golomb(b, 0); // mb_type = P_L0_16x16
+
+	// mb_pred()
+	
+	set_se_golomb(b, 0); // write 0 for x motion vector 
+	set_se_golomb(b, 0); // write 0 for y motion vector 
+
+	// coded_block_pattern
+	
+	CodedBlockPatternLuma = 0;
+
+	// first 8x8 block
+	done = 0;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[0][0][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[0][1][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[1][0][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[1][1][y][x] != 0) done = 1;
+	if (done)
+		CodedBlockPatternLuma |= (1 << 0);
+	// second 8x8 block
+	done = 0;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[0][2][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[0][3][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[1][2][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[1][3][y][x] != 0) done = 1;
+	if (done)
+		CodedBlockPatternLuma |= (1 << 1);
+	// third 8x8 block
+	done = 0;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[2][0][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[2][1][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[3][0][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[3][1][y][x] != 0) done = 1;
+	if (done)
+		CodedBlockPatternLuma |= (1 << 2);
+	// fourth 8x8 block
+	done = 0;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[2][2][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[2][3][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[3][2][y][x] != 0) done = 1;
+	for (y = 0 ; !done && y < 4 ; y++) for (x = 0 ; !done && x < 4 ; x++) if (residual->part4x4Y[3][3][y][x] != 0) done = 1;
+	if (done)
+		CodedBlockPatternLuma |= (1 << 3);
+
+	// check for too large values in luma
+	for (y = 0 ; y < 16 ; y++)
+	{
+		for (x = 0 ; x < 16 ; x++)
+		{
+			int32_t val = residual->Y[y][x];
+
+			if (val > 2047)
+				residual->Y[y][x] = 2047;
+			else if (val < -2047)
+				residual->Y[y][x] = -2047;
+		}
+	}
+
+	chromaDCcount = 0;
+	chromaACcount = 0;
+	for (y = 0 ; y < 8 ; y++)
+	{
+		for (x = 0 ; x < 8 ; x++)
+		{
+			if (!((x % 4) == 0 && (y % 4) == 0))
+			{
+				int32_t val1 = residual->U[y][x];
+				int32_t val2 = residual->V[y][x];
+				
+				if (val1 != 0)
+					chromaACcount++;
+				if (val2 != 0)
+					chromaACcount++;
+				if (val1 > 2047)
+					residual->U[y][x] = 2047;
+				else if (val1 < -2047)
+					residual->U[y][x] = -2047;
+				if (val2 > 2047)
+					residual->V[y][x] = 2047;
+				else if (val2 < -2047)
+					residual->V[y][x] = -2047;
+			}
+		}
+	}
+
+	for (y = 0 ; y < 2 ; y++)
+	{
+		for (x = 0 ; x < 2 ; x++)
+		{
+			int32_t val1 = UD[y][x];
+			int32_t val2 = VD[y][x];
+			
+			if (val1 != 0)
+				chromaDCcount++;
+			if (val2 != 0)
+				chromaDCcount++;
+
+			if (val1 > 2047)
+				UD[y][x] = 2047;
+			else if (val1 < -2047)
+				UD[y][x] = -2047;
+			if (val2 > 2047)
+				VD[y][x] = 2047;
+			else if (val2 < -2047)
+				VD[y][x] = -2047;
+		}
+	}
+	
+	if (chromaDCcount == 0)
+	{
+		if (chromaACcount == 0)
+			CodedBlockPatternChroma = 0;
+		else
+			CodedBlockPatternChroma = 2;
+	}
+	else
+	{
+		if (chromaACcount == 0)
+			CodedBlockPatternChroma = 1;
+		else
+			CodedBlockPatternChroma = 2;
+	}
+
+	coded_block_pattern = (CodedBlockPatternChroma << 4)|CodedBlockPatternLuma;
+	set_ue_golomb(b,me_map[coded_block_pattern]);
+			
+	// residual()
+
+	if (CodedBlockPatternLuma == 0 && CodedBlockPatternChroma == 0) // nothing left to do
+	{
+		int x,y;
+
+		for (y = 0 ; y < 4 ; y++)
+			for (x = 0 ; x < 4 ; x++)
+				mb->Y_nonzero[y][x] = 0;
+
+		for (y = 0 ; y < 2 ; y++)
+		{
+			for (x = 0 ; x < 2 ; x++)
+			{
+				mb->U_nonzero[y][x] = 0;
+				mb->V_nonzero[y][x] = 0;
+			}
+		}
+		return; 
+	}
+	
+	set_se_golomb(b, 0); // mb_qp_delta
+
+	// encode luma levels
+	for (j = 0 ; j < 4 ; j++)
+	{
+		int X = (j%2)*2;
+		int Y = (j/2)*2;
+			
+		if ((CodedBlockPatternLuma >> j)&1)
+		{
+			for (i = 0 ; i < 4 ; i++)
+			{
+				int x = (i%2)+X;
+				int y = (i/2)+Y;
+			
+				int k;
+
+				for (k = 0 ; k < 16 ; k++)
+					coefficients[k] = residual->part4x4Y[y][x][zigzagy[k]][zigzagx[k]];
+				ff_h264_neighbour_count_nonzero(mb,NEIGHBOUR_SUBTYPE_Y,x,y,&nA,&nB);
+				mb->Y_nonzero[y][x] = h264cavlc_encode(b,coefficients,16,nA,nB,0);
+			}
+		}
+		else
+		{
+			for (i = 0 ; i < 4 ; i++)
+			{
+				int x = (i%2)+X;
+				int y = (i/2)+Y;
+				mb->Y_nonzero[y][x] = 0;
+			}			
+		}
+	}
+
+	// chroma DC levels
+	if (CodedBlockPatternChroma != 0)
+	{
+		coefficients[0] = UD[0][0];
+		coefficients[1] = UD[0][1];
+		coefficients[2] = UD[1][0];
+		coefficients[3] = UD[1][1];
+		h264cavlc_encode(b,coefficients,4,-1,-1,1); // nA and nB are not used in this case
+		
+		coefficients[0] = VD[0][0];
+		coefficients[1] = VD[0][1];
+		coefficients[2] = VD[1][0];
+		coefficients[3] = VD[1][1];
+		h264cavlc_encode(b,coefficients,4,-1,-1,1); // nA and nB are not used in this case
+	}
+	
+	if (CodedBlockPatternChroma == 2)
+	{
+		for (i = 0 ; i < 4 ; i++)
+		{
+			int x = (i%2);
+			int y = (i/2);
+				
+			int k;
+	
+			for (k = 0 ; k < 15 ; k++)
+				coefficients[k] = residual->part4x4U[y][x][zigzagy[k+1]][zigzagx[k+1]];
+			ff_h264_neighbour_count_nonzero(mb,NEIGHBOUR_SUBTYPE_U,x,y,&nA,&nB);
+			mb->U_nonzero[y][x] = h264cavlc_encode(b,coefficients,15,nA,nB,0);
+		}
+		
+		for (i = 0 ; i < 4 ; i++)
+		{
+			int x = (i%2);
+			int y = (i/2);
+				
+			int k;
+	
+			for (k = 0 ; k < 15 ; k++)
+				coefficients[k] = residual->part4x4V[y][x][zigzagy[k+1]][zigzagx[k+1]];
+			ff_h264_neighbour_count_nonzero(mb,NEIGHBOUR_SUBTYPE_V,x,y,&nA,&nB);
+			mb->V_nonzero[y][x] = h264cavlc_encode(b,coefficients,15,nA,nB,0);
+		}
+	}
+	else
+	{
+		int x,y;
+
+		for (y = 0 ; y < 2 ; y++)
+		{
+			for (x = 0 ; x < 2 ; x++)
+			{
+				mb->U_nonzero[y][x] = 0;
+				mb->V_nonzero[y][x] = 0;
+			}
+		}	
+	}
+}
+
+static void ff_h264_encode_Inter_16x16(H264Context *t, MacroBlock *targetmb, PutBitContext *b,
+		                         MacroBlock *destmb, FrameInfo **previous_frames,
+					 int num_prev_frames, int mbx, int mby)
+{
+	// we'll be using motion vector (0,0) for now
+	
+	MacroBlock *srcmb;
+	Residual residual;
+	int y,h,x,w;
+	int w2,h2;
+	int qPI;
+	int QPc;
+	int QPy = t->QP;
+	int32_t UD[2][2];
+	int32_t VD[2][2];
+
+	qPI = t->QP + t->chroma_qp_index_offset;
+	if (qPI < 0)
+		qPI = 0;
+	if (qPI > 51)
+		qPI = 51;
+	QPc = chroma_qp[qPI];
+
+	w = targetmb->Y_width;
+	h = targetmb->Y_height;
+	w2 = w>>1;
+	h2 = h>>1;
+
+	// Our prediction of the macroblock will be the corresponding macroblock of the
+	// previous frame
+	
+	srcmb = &(previous_frames[0]->reconstructed_mb_map[mby][mbx]);
+
+	for (y = 0 ; y < h ; y++)
+	{
+		for (x = 0 ; x < w ; x++)
+			destmb->Y[y][x] = srcmb->Y[y][x];
+	}	
+
+	for (y = 0 ; y < h2 ; y++)
+	{
+		for (x = 0 ; x < w2 ; x++)
+		{
+			destmb->U[y][x] = srcmb->U[y][x];
+			destmb->V[y][x] = srcmb->V[y][x];
+		}
+	}
+	
+	// Calculate residual
+
+	ff_h264_init_residual(&residual);
+	
+	for (y = 0 ; y < h ; y++)
+	{
+		for (x = 0 ; x < w ; x++)
+			residual.Y[y][x] = (int32_t)targetmb->Y[y][x] - (int32_t)destmb->Y[y][x];
+	}	
+
+	for (y = 0 ; y < h2 ; y++)
+	{
+		for (x = 0 ; x < w2 ; x++)
+		{
+			residual.U[y][x] = (int32_t)targetmb->U[y][x] - (int32_t)destmb->U[y][x];
+			residual.V[y][x] = (int32_t)targetmb->V[y][x] - (int32_t)destmb->V[y][x];
+		}
+	}
+	
+	// Transform residual: DCT
+
+	for (y = 0 ; y < 4 ; y++)
+	{
+		for (x = 0 ; x < 4 ; x++)
+		{
+			ff_h264_transform_DCT(residual.part4x4Y[y][x],QPy,0);
+		}
+	}
+	for (y = 0 ; y < 2 ; y++)
+	{
+		for (x = 0 ; x < 2 ; x++)
+		{
+			ff_h264_transform_DCT(residual.part4x4U[y][x],QPc,1);
+			ff_h264_transform_DCT(residual.part4x4V[y][x],QPc,1);
+		}
+	}
+	// For U
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			UD[y][x] = residual.part4x4U[y][x][0][0];
+	ff_h264_hadamard_mult_2x2(UD);
+	ff_h264_hadamard_quant_2x2(UD,QPc);
+  
+	// For V
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			VD[y][x] = residual.part4x4V[y][x][0][0];
+	ff_h264_hadamard_mult_2x2(VD);
+	ff_h264_hadamard_quant_2x2(VD,QPc);
+
+	// Encode motion vectors, residual, ...
+	
+	set_ue_golomb(b, 0); // mb_skip_run = 0  (we won't be skipping any macroblocks)
+	ff_h264_encode_inter16x16_residual(b,0,0,&residual,UD,VD,0,destmb);
+
+	// Inverse hadamard
+	
+	// For U
+	ff_h264_hadamard_mult_2x2(UD);
+	ff_h264_hadamard_invquant_2x2(UD,QPc);
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			residual.part4x4U[y][x][0][0] = UD[y][x];
+	// For V
+	ff_h264_hadamard_mult_2x2(VD);
+	ff_h264_hadamard_invquant_2x2(VD,QPc);
+	for (y = 0 ; y < 2 ; y++)
+		for (x = 0 ; x < 2 ; x++)
+			residual.part4x4V[y][x][0][0] = VD[y][x];
+		
+	// Inverse DCT and add
+	
+	for (y = 0 ; y < 4 ; y++)
+	{
+		for (x = 0 ; x < 4 ; x++)
+		{
+			ff_h264_transform_inverse_DCT_add(&(t->dspcontext),residual.part4x4Y[y][x],QPy,0,&(destmb->Y[y*4][x*4]),t->Y_stride);
+		}
+	}
+	for (y = 0 ; y < 2 ; y++)
+	{
+		for (x = 0 ; x < 2 ; x++)
+		{
+			ff_h264_transform_inverse_DCT_add(&(t->dspcontext),residual.part4x4U[y][x],QPc,1,&(destmb->U[y*4][x*4]),t->V_stride);
+			ff_h264_transform_inverse_DCT_add(&(t->dspcontext),residual.part4x4V[y][x],QPc,1,&(destmb->V[y*4][x*4]),t->U_stride);
+		}
+	}	
+	
+	destmb->available = 1;
+}
+
+static int ff_h264_encode(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data)
+{
+	H264Context *t = (H264Context *)avctx->priv_data;
+	PutBitContext b;
+	int mbx, mby;
+	uint8_t *dest;
+	int destlen, i;
+	FrameInfo *tmp;
+	int isIDR = 0;
+	static int show_once = 0;
+
+	if (t->frame_num % t->IDRcount == 0)
+		isIDR = 1;
+
+	if(!show_once)
+	{
+		av_log(avctx, AV_LOG_INFO, "width: %d height: %d buffer_size: %d\n", avctx->width, avctx->height,buf_size);
+		show_once = 1;
+	}
+	
+	destlen = t->bufsize;
+	dest = t->bytestream;
+	
+	ff_h264_assign_macroblocks((AVPicture *)data,t->mb_map,t->mb_width,t->mb_height,0);
+	ff_h264_clear_nonzero_markers(t->reconstructed_frames[0]->reconstructed_mb_map,t->mb_width,t->mb_height);
+	
+	// sequence parameter set rbsp
+	
+	init_put_bits(&b,t->bitstream,t->bufsize);
+	
+	put_bits(&b,8,66); // profile_idc = 66 in Baseline
+	put_bits(&b,1,0); // constraint_set0_flag
+	put_bits(&b,1,0); // constraint_set1_flag
+	put_bits(&b,1,0); // constraint_set2_flag
+	put_bits(&b,1,0); // constraint_set3_flag
+	put_bits(&b,4,0); // reserved_zero_bits
+	put_bits(&b,8,40); // level_idc, p. 262, 10*level number
+
+	set_ue_golomb(&b,0); // seq_parameter_set_id
+	set_ue_golomb(&b,2); // log2_max_frame_num_minus4
+	set_ue_golomb(&b,2); // pic_order_cnt
+	set_ue_golomb(&b,16); // num_ref_frames [0, 16] (make sure we can use enough)
+	
+	put_bits(&b,1,0); // gaps_in_frame_num_value_allowed_flag
+	
+	set_ue_golomb(&b,t->mb_width-1); // pic_width_in_mbs_minus1
+	set_ue_golomb(&b,t->mb_height-1); // pic_height_in_map_units_minus1
+	
+	put_bits(&b, 1, 1); // frame_mbs_only_flag = 1 in Baseline
+	put_bits(&b, 1, 0); // direct_8x8_inference_flag
+	put_bits(&b, 1, t->frame_cropping_flag); // frame_cropping_flag
+	
+	if (t->frame_cropping_flag)
+	{
+		set_ue_golomb(&b, t->frame_crop_left_offset);
+		set_ue_golomb(&b, t->frame_crop_right_offset);
+		set_ue_golomb(&b, t->frame_crop_top_offset);
+		set_ue_golomb(&b, t->frame_crop_bottom_offset);
+	}	
+	
+	put_bits(&b, 1, 0); // vui_parameters_present_flag
+	put_bits(&b, 1, 1); // rbsp_stop_one_bit
+
+	dest = ff_h264_write_nal_unit(1,NAL_SPS,dest,&destlen,&b);
+	
+	// Baseline: nal_unit_type not in [2,4] 
+
+	// picture parameter set
+	
+	init_put_bits(&b,t->bitstream,t->bufsize);
+	
+	set_ue_golomb(&b,0); // pic_parameter_set_id
+	set_ue_golomb(&b,0); // seq_parameter_set_id
+	put_bits(&b,1,0); // entropy_coding_mode 			0 = CAVLC
+	put_bits(&b,1,0); // pic_order_present_flag
+	set_ue_golomb(&b,0); // num_slice_groups_minus1			Only one slice group
+	// List0 is needed for enabling P-slices
+	set_ue_golomb(&b,0); // num_ref_idx_l0_active_minus1		Using at most the previous frame for prediction
+	set_ue_golomb(&b,0); // num_ref_idx_l1_active_minus1		Definitely not using list 1 in baseline
+	put_bits(&b,1,0); // weighted_pred_flag				Is 0 in baseline
+	put_bits(&b,2,0); // weighted_bipred_idc			Is 0 in baseline
+	set_se_golomb(&b,t->QP-26); // pic_init_qp_minus26
+	set_se_golomb(&b,0); // pic_init_qs_minus26
+	
+	set_se_golomb(&b,t->chroma_qp_index_offset); // chroma_qp_index_offset 
+	
+#ifndef DISABLE_DEBLOCKING
+	put_bits(&b,1,0); // deblocking_filter_control_present_flag
+#else
+	put_bits(&b,1,1); // deblocking_filter_control_present_flag
+#endif // DISABLE_DEBLOCKING
+	
+	put_bits(&b,1,0); // constrained_intra_pred_flag
+	put_bits(&b,1,0); // redundant_pic_cnt_present
+	
+	put_bits(&b,1,1); // rbsp_stop_one_bit
+	
+	dest = ff_h264_write_nal_unit(1,NAL_PPS,dest,&destlen,&b);
+
+	// IDR slice or P slice
+
+	init_put_bits(&b,t->bitstream,t->bufsize);
+
+	// Slice header
+	set_ue_golomb(&b, 0); // first_mb_in_slice
+
+	if (isIDR)
+		set_ue_golomb(&b, 7); // slice_type
+	else
+		set_ue_golomb(&b, 5); // slice_type
+	// 0: current slice is P-slice
+	// 2: current slice is I-slice
+	// 5: current and all other slices are P-slices (0 or 5)
+	// 7: current and all other slices are I-slices (2 or 7)
+	
+	set_ue_golomb(&b, 0); // pic_parameter_set_id
+	put_bits(&b, 6, t->frame_num%t->IDRcount); // frame_num
+	//put_bits(&b, 4, 0); // frame_num
+	if (isIDR)
+		set_ue_golomb(&b, t->IDR_frame_num); // idr_pic_id
+	else
+		put_bits(&b, 1, 0); // num_ref_idx_active_override_flag
+	
+	// dec_ref_pic_marking() ...
+	put_bits(&b, 1, 0); // no_output_of_prior_pics_flag
+	put_bits(&b, 1, 0); // long_term_reference_flag
+	// ... dec_ref_pic_marking()
+	set_se_golomb(&b, 0); // slice_qp_delta
+
+#ifdef DISABLE_DEBLOCKING
+	set_ue_golomb(&b, 1); // disable_deblocking_filter_idc
+#endif // DISABLE_DEBLOCKING
+
+	// Slice data
+
+	if (isIDR)
+	{
+		for(mby = 0; mby < t->mb_height ; mby++)
+			for(mbx = 0 ; mbx < t->mb_width ; mbx++)
+				ff_h264_encode_Intra_16x16(t,&(t->mb_map[mby][mbx]),&b,&(t->reconstructed_frames[0]->reconstructed_mb_map[mby][mbx]));
+	}
+	else // Inter encoded frame
+	{
+		for(mby = 0; mby < t->mb_height ; mby++)
+			for(mbx = 0 ; mbx < t->mb_width ; mbx++)
+				ff_h264_encode_Inter_16x16(t,&(t->mb_map[mby][mbx]),&b,&(t->reconstructed_frames[0]->reconstructed_mb_map[mby][mbx]),&(t->reconstructed_frames[1]),t->framebufsize-1,mbx,mby);
+	}
+
+	// Trailing bits
+	
+	put_bits(&b,1,1); // rbsp_stop_one_bit
+	
+	if (isIDR)
+		dest = ff_h264_write_nal_unit(1,NAL_IDR_SLICE,dest,&destlen,&b);
+	else
+		dest = ff_h264_write_nal_unit(1,NAL_SLICE,dest,&destlen,&b);
+	
+	// cycle frame buffer
+	
+	tmp = t->reconstructed_frames[t->framebufsize-1];
+	for (i = t->framebufsize-1 ; i > 0 ; i--)
+		t->reconstructed_frames[i] = t->reconstructed_frames[i-1];
+	t->reconstructed_frames[0] = tmp;
+	
+	// copy the encoded bytes
+	memcpy(buf,t->bytestream,t->bufsize-destlen);
+
+	// adjust frame numbers
+	t->frame_num++;
+	if (isIDR)
+		t->IDR_frame_num++;
+
+	return (t->bufsize-destlen); 
+}
+
+static int ff_h264_encoder_close(AVCodecContext *avctx)
+{
+	PutBitContext b;
+	H264Context *t = (H264Context *)avctx->priv_data;
+	uint8_t *dest;
+	int destlen;
+	int y,i;
+		
+	destlen = t->bufsize;
+	dest = t->bytestream;
+	
+	init_put_bits(&b,t->bitstream,t->bufsize);
+	
+	// write end of stream
+
+	dest = ff_h264_write_nal_unit(0,NAL_END_STREAM,dest,&destlen,&b);
+
+	*dest = 0;
+	dest++;
+	destlen--;
+
+	// clean up
+
+	av_free(t->bitstream);
+	av_free(t->bytestream);
+	
+	for (y = 0 ; y < t->mb_height ; y++)
+		av_free(t->mb_map[y]);
+	
+	av_free(t->mb_map);
+
+	for (i = 0 ; i < t->framebufsize ; i++)
+	{
+		av_free(t->reconstructed_frames[i]->reconstructed_picture.data[0]);
+	
+		for (y = 0 ; y < t->mb_height ; y++)
+			av_free(t->reconstructed_frames[i]->reconstructed_mb_map[y]);
+	
+		av_free(t->reconstructed_frames[i]->reconstructed_mb_map);
+		av_free(t->reconstructed_frames[i]);
+	}
+	av_free(t->reconstructed_frames);
+
+	return 0;
+}
+
+#ifdef CONFIG_ENCODERS
+AVCodec h264_encoder = {
+	"ffh264",
+	CODEC_TYPE_VIDEO,
+	CODEC_ID_FFH264,
+	sizeof(H264Context),
+	ff_h264_encoder_init,
+	ff_h264_encode,
+	ff_h264_encoder_close,
+};
+#endif
+
