A = [
62 65 169 63 66 58 75 58 71 67 62 49 44 61 66 55 63 50 46 55 70 73 54 66 64 88 83 100 130 137 163 178 189 209 184 211 196 188 179 191 199 205 200 189 192 202 238 228 190 191 210 211 174 159 179 174 169 202 206 152 155 193 189 175 190 179 195 158 192 167 176 202 170 152 163 166 146 165 142 194 131 131 134 126 169 133 171 140 145 143 142 146 132 152 141 131 140 148 170 178 188 132 163 160 167 179 156 166 125 151 163 153 132 147 125 148 151 119 131 121 139 137 113 103 106 104 107 117 86 117 109 122 93 112 90 128 120 104 123 126 116 111 117 93 131 109 100 114 102 94 101 97 87 98 102 95 84 107 93 89 93 85 93 108 97 122 109 86 87 101 72 76 91 77 112 93 78 81 91 87 74 76 97 87 95 83 86 55 68 70 61 69 73 58 58 47 63 63 68 63 49 89 59 59 54 65 54 52 64 47 59 62 52 48 48 53 60 57 70 53 68 67 66 72 79 81 64 65 62 80 60 75 55 86 70 50 58 50 66 49 62 44 46 57 48 43 40 38 37 49 54 45 40 47 61 50 48 53 47 44 48 30 35 35 39 27 36 26 31 39 28 29 36 47 35 33 30 25 29 27 38 42 26 32 29 31 28 32 31 20 27 37 23 35 25 29 25 28 20 16 18 18 21 19 24 21 28 25 38 31 30 32 35 44 26 28 36 27 24 19 25 39 25 26 26 25 21 23 25 16 24 16 26 30 28 20 18 18 13 31 22 19 24 32 17 18 25 24 25 25 23 16 32 28 24 34 14 16 26 19 15 20 19 17 16 18 11 13 9 15 12 15 20 16 18 11 12 14 25 8 17 21 14 27 19 15 13 14 15 16 16 16 7 17 17 2 12 10 10 7 9 5 10 5 8 9 10 12 13 11 10 8 8 8 10 7 15 7 9 8 5 7 11 7 8 2 2 11 4 1 4 3 16 11 3 8 5 8 4 10 9 5 8 4 6 7 5 1 5 5 4 4 7 5 2 2 5 7 4 5 7 7 4 4 6 7 7 9 5 10 8 7 4 4 4 14 6 6 10 7 9 14 7 14 9 9 7 11 8 8 7 6 13 7 13 3 6 8 4 3 4 8 4 8 8 8 5 11 4 7 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 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 
];
D = [
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
2 0 0 0
2 0 1 0
17 0 1 1
16 0 0 0
41 2 1 0
62 1 2 0
129 1 2 0
194 6 7 3
255 10 6 3
296 20 7 6
303 31 8 12
301 46 8 12
231 73 18 20
113 124 39 44
58 204 57 56
54 208 56 64
75 268 83 56
79 294 71 78
63 165 86 55
61 212 81 48
61 133 102 83
79 94 100 104
89 100 120 102
101 91 124 107
109 103 105 106
122 141 126 100
127 119 124 117
128 130 140 127
124 136 142 121
125 127 169 130
158 173 176 149
161 145 197 166
155 175 211 184
176 174 181 171
188 165 199 180
190 196 165 183
181 190 184 149
187 194 211 168
167 186 220 149
102 88 97 74
1 0 0 1
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

];x = [
10 12 15 19 23 28 35 43 53 66 81 100 123 152 187 231 285 351 433 534 658 811 1000 1233 1520 1874 2310 2848 3511 4329 5337 6579 8111 10000 12328 15199 18738 23101 28480 35112 43288 53367 65793 81113 100000 123285 151991 187382 231013 284804 351119 432876 533670 657933 811131 1000000 1232847 1519911 1873817 2310130 2848036 3511192 4328761 5336699 6579332 8111308 10000000 12328467 15199111 18738174 23101297 28480359 35111917 43287613 53366992 65793322 81113083 100000000 123284674 151991108 187381742 231012970 284803587 351119173 432876128 533669923 657933225 811130831 1000000000 1232846739 1519911083 1873817423 2310129700 2848035868 3511191734 4328761281 5336699231 6579332247 8111308308 10000000000 
];
