A = [
62454 71930 2352083 48820 68720 70618 61877 71261 77522 70119 73778 83491 74023 77835 86748 77214 82269 88918 79718 85193 91001 79912 84029 90284 80015 86360 92379 82168 88502 93749 82070 85679 90543 79570 83665 88619 77621 81404 86425 75490 78778 83459 73792 77008 82318 71748 75070 79921 69365 73333 77508 68080 72241 76269 66711 69457 73531 65481 68542 72693 63364 66085 70658 62402 64898 69587 60847 62929 67464 59526 61690 65838 57982 60628 64324 56938 59111 63234 55777 58094 61438 54225 56577 59854 52729 55316 58840 51642 53742 57368 50157 52532 55350 49766 51388 53712 47891 50296 52829 47076 48962 51719 45981 47397 50574 44930 46422 49131 43152 45144 48016 42182 44039 46797 41735 42865 45847 40259 41941 44234 39351 40512 43048 37842 39508 41972 37485 38431 40730 36236 37768 39381 34727 35896 38304 33688 34934 37358 32940 33975 36021 32203 33293 35038 31149 32228 34136 29749 31298 32516 29365 30284 31580 28299 29297 30584 27347 28200 30213 26571 27538 28892 25593 26548 28147 25165 25854 27246 23839 24948 26145 23197 23811 24937 22286 23555 24353 21575 22404 23464 20928 21429 22682 20255 21011 21876 19594 20154 21247 19133 19761 20699 18278 18804 19845 17702 18378 19200 16932 17837 18394 16371 17184 17975 16059 16629 17100 15250 15872 16785 14835 15316 16268 14596 14919 15764 13744 14211 15195 13424 14055 14619 12948 13167 13872 12638 13160 13552 11984 12366 12991 11624 11996 12554 11211 11557 11963 10935 11173 11629 10524 10737 11374 10166 10308 10825 9661 10167 10413 9440 9775 10242 9322 9465 9867 8711 9099 9137 8547 8756 9137 8211 8426 8831 7847 8147 8369 7560 7792 8205 7212 7476 7852 7153 7205 7612 6675 7089 7222 6417 6673 7019 6157 6402 6793 6138 6340 6513 5725 6006 6255 5570 5771 6159 5323 5635 5887 5100 5344 5590 5251 5269 5346 4731 5021 5136 4708 4841 5006 4542 4536 4896 4253 4499 4770 4255 4272 4532 4056 4175 4345 3944 4089 4157 3765 3952 4160 3613 3688 3907 3482 3602 3718 3299 3504 3576 3213 3292 3410 3041 3239 3406 2977 2955 3200 2881 2920 2999 2655 2715 2920 2623 2756 2858 2516 2722 2660 2451 2546 2769 2330 2448 2459 2201 2300 2461 2128 2253 2354 2181 2159 2181 2011 2074 2181 1962 2001 2093 1790 1935 2035 1824 1856 1914 1790 1774 1858 1643 1689 1793 1550 1696 1709 1682 1620 1677 1482 1521 1586 1419 1454 1568 1451 1475 1479 1341 1332 1434 1296 1378 1311 1325 1346 1329 1178 1187 1255 1154 1194 1224 1060 1090 1173 1036 1127 1126 972 1077 1078 1026 928 1014 984 1001 1057 835 941 934 841 904 985 784 861 860 814 877 824 778 778 780 708 712 870 721 711 760 680 722 767 681 694 683 629 679 727 657 615 666 610 611 605 548 566 623 546 510 558 556 533 594 490 544 539 465 519 519 447 493 487 474 486 504 420 415 449 419 446 456 376 398 411 383 400 375 370 374 372 331 358 380 373 357 320 306 315 366 288 323 329 318 311 309 296 271 320 277 270 311 263 252 269 248 282 291 245 240 256 218 240 291 218 209 225 224 224 202 194 232 249 214 202 190 178 176 201 202 198 217 203 182 191 158 175 181 167 178 167 163 178 155 172 144 152 136 136 175 112 148 176 132 147 157 122 123 131 143 127 139 130 127 126 105 115 102 111 124 110 116 115 96 84 87 123 113 97 122 91 97 95 99 90 101 87 91 92 85 78 98 83 89 100 81 80 67 81 82 80 69 82 71 62 80 70 62 94 79 89 97 74 69 67 70 60 62 63 53 58 63 62 54 66 58 59 62 52 50 64 47 54 52 46 43 54 61 48 48 46 44 48 46 49 39 46 42 52 44 39 40 45 52 34 39 43 52 37 29 44 30 34 41 47 41 38 42 40 32 35 29 26 28 31 35 31 44 30 32 30 29 25 33 32 26 32 38 35 17 28 21 32 21 12 23 26 27 22 26 21 21 25 24 17 23 25 29 15 30 24 18 25 20 21 20 20 17 15 22 16 14 14 18 13 12 19 20 12 12 19 20 19 15 15 15 16 22 16 12 14 11 16 10 12 16 11 15 11 13 24 18 23 7 16 18 10 22 13 11 13 15 17 17 11 11 13 6 19 14 8 13 12 6 14 21 10 18 9 17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 2 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 1 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 1 0 0 0 0 
];
B = [
0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 3936 3155 781
 8425 6939 1486
 1904 1511 393
 38403 32584 5819
 2378 1959 419
 7009 6083 926
 4026 3280 746
 8664 6907 1757
 482 372 110
 45474 38286 7188
 11 11 0
 58 46 12
 1440 1249 191
 12073 10787 1286
 1139 991 148
 870 764 106
 798 650 148
 2665 2253 412
 85462 72972 12490
 26 20 6
 1777 1592 185
 1178 1047 131
 1041 862 179
 4345 3759 586
 107147 93146 14001
 2665 2406 259
 2268 2042 226
 827 744 83
 22844 20225 2619
 48995 44499 4496
 7584132 6937940 646192
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
4 87 0 0
0 16 0 0
3 28 0 0
0 39 0 0
3 28 0 1
4 30 39 14
209 51 126 50
1228 61 196 122
5802 63 228 148
20930 87 399 271
47927 76 445 305
115013 105 610 407
246912 148 738 524
482568 189 820 601
756007 247 1013 765
1016140 353 1077 904
1133505 509 1136 989
1111186 581 1276 1110
931114 769 1355 1268
623045 899 1481 1463
304209 1131 1694 1682
101410 1420 1805 1810
20541 1615 2042 1924
4266 1936 2217 2126
3399 2150 2508 2379
3718 2481 2688 2712
3356 2538 2790 2859
3423 2762 2937 3003
3150 2919 3057 3087
3219 2994 3109 3082
3475 3126 3170 3157
3306 3160 3184 3197
3075 3090 3056 2986
3035 2944 2910 2963
2947 2872 2868 2954
2875 2755 2647 2648
2586 2630 2643 2580
2534 2467 2464 2447
2486 2409 2420 2383
2344 2342 2363 2257
2262 2188 2188 2235
2197 2267 2176 2177
2440 2230 2165 2213
2221 2138 2186 2137
2311 2190 2213 2216
2240 2196 2186 2172
2281 2214 2294 2315
2192 2182 2194 2252
2162 2370 2332 2203
2162 2276 2228 2183
2154 2122 2255 2118
2111 2095 2088 1973
1963 1937 1982 1893
1750 1755 1884 1844
1763 1572 1593 1648
1470 1398 1398 1435
1230 1247 1174 1197
998 1083 1046 976
792 783 785 820
552 600 584 562
337 363 359 347
67 67 82 95
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
