A = [
651 403 489 418 449 450 454 441 455 452 462 419 453 401 418 449 421 421 444 411 419 461 430 381 422 416 442 415 427 385 377 432 395 402 394 382 397 421 409 422 373 415 417 390 388 381 377 401 392 352 404 421 365 376 382 342 403 377 378 377 366 396 342 377 346 358 317 310 328 348 304 346 332 332 365 363 329 328 307 331 334 325 312 299 307 291 321 285 291 302 273 299 288 322 288 296 292 261 250 277 257 252 248 240 272 253 243 237 218 259 232 220 244 232 219 253 192 230 211 249 255 221 206 211 205 229 194 241 209 223 197 172 194 179 191 179 165 172 183 177 174 178 196 184 156 166 169 175 161 164 153 154 157 159 169 140 176 154 129 149 152 145 131 111 145 132 127 126 129 135 136 131 123 118 121 122 119 126 113 98 116 114 105 117 104 120 109 98 112 90 97 103 117 109 101 94 92 80 91 92 105 96 88 87 116 100 96 85 72 70 86 89 72 71 69 75 81 84 79 76 91 92 79 71 87 83 63 75 66 68 67 72 57 62 62 62 59 53 77 62 75 71 47 65 73 61 59 48 43 55 62 59 57 60 47 65 60 51 48 45 46 58 51 48 65 52 54 42 56 46 52 35 43 53 36 40 41 40 50 39 39 45 41 47 34 53 42 32 47 43 39 30 51 42 35 29 33 21 43 40 35 30 34 38 48 33 34 39 39 36 48 36 36 36 30 38 38 31 38 33 23 27 32 34 31 39 27 22 31 24 29 34 31 28 25 25 29 26 31 36 31 24 20 30 21 23 22 16 22 24 22 30 17 32 20 23 23 26 18 28 21 17 24 19 18 22 22 23 21 19 17 24 20 24 27 14 19 18 19 20 25 22 16 18 15 26 16 14 15 27 21 24 13 23 13 18 22 19 16 21 10 17 17 25 16 14 12 22 19 12 8 17 22 22 24 10 12 17 13 19 20 15 5 16 13 13 24 11 9 20 14 13 15 12 15 18 20 8 14 12 14 15 22 16 14 12 12 15 17 13 13 13 21 8 11 13 10 14 12 14 10 14 17 8 10 13 12 17 12 13 16 12 12 18 11 15 17 10 16 11 23 14 14 7 10 15 14 10 14 12 9 8 13 14 16 9 11 10 16 12 7 6 15 12 8 6 6 10 10 10 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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 1 0 0
0 0 0 0
0 0 0 0
0 2 0 0
0 1 0 0
1 0 1 0
5 2 0 0
44 1 2 2
221 1 2 3
737 4 4 3
1575 6 5 2
2170 7 7 3
2715 6 10 9
3738 6 12 14
4271 9 6 11
3363 14 10 21
3064 13 19 14
2498 21 26 17
1164 24 24 23
539 36 30 25
121 41 32 26
47 26 39 30
47 31 33 46
33 29 37 36
33 24 31 37
39 44 30 33
19 37 29 38
29 35 41 26
25 26 27 28
38 45 32 36
34 41 30 30
34 22 36 26
27 37 32 29
28 28 29 34
29 25 35 31
22 32 28 31
26 22 29 34
31 26 30 24
26 24 27 32
24 26 34 26
29 36 31 29
20 25 26 37
38 48 32 33
47 42 35 37
25 43 34 38
29 34 28 29
34 30 27 37
36 26 26 25
26 24 25 34
22 19 30 29
21 20 14 31
23 30 37 29
25 20 24 36
25 31 26 31
23 23 27 28
27 24 26 20
17 16 26 22
22 17 17 22
18 22 14 20
17 13 8 13
9 8 17 6
14 2 9 5
5 2 7 8
4 6 7 5
1 5 0 2
1 2 0 2
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
