A = [
386963 410736 7759914 291353 168427 153962 143609 84024 75310 64558 64091 53085 51269 50009 49377 48343 48170 47994 48299 47600 47033 47444 46524 46763 47475 63083 63318 65573 80708 81077 83520 83827 83522 85316 85322 85331 84809 84733 83450 82444 82719 82983 81959 81875 82397 81227 80162 81777 80043 79724 80284 78699 78946 78328 77269 76119 76434 76985 75828 74907 75845 74278 74299 73978 73060 73350 72503 71707 71204 70477 70385 69571 68825 68791 68525 68086 67957 67173 65963 65402 65554 64793 64344 63517 63583 62721 61757 61335 60296 60306 59521 58902 58822 58082 57878 57672 56465 56606 56602 56319 56205 55579 55720 54914 54305 54591 54408 54142 53744 53633 53409 52698 52648 52016 52028 52333 51512 51776 51379 51028 50847 50324 50061 49779 49488 49938 49331 49671 49037 49191 48924 48449 48123 48228 47771 47047 47325 47176 47172 47246 46084 46409 46190 45863 45626 45373 44673 44661 44376 44027 43323 43847 42874 43013 42894 42408 41951 41759 41132 41568 40652 40660 39967 39790 39514 39032 39335 38515 38412 37794 37117 37003 37055 36426 35909 35425 34901 34601 34609 34083 33482 33267 32954 32380 32377 31600 31276 30867 30937 30581 30089 29408 29272 28556 28375 28242 27646 26715 26782 26481 25959 25696 25356 25289 24723 24745 23947 23637 23092 22687 22620 22344 21513 21564 21517 20831 20282 20298 20292 19580 19100 18781 18399 18471 17867 17431 17329 17160 16381 16506 16293 15876 15733 15290 15076 15020 14459 14780 14503 14074 13939 13528 13113 13148 12684 12676 12194 11858 11606 11430 11200 10969 10941 10533 10471 10235 9762 9915 9658 9226 9334 9027 8804 8732 8417 8419 8297 7877 7815 7710 7609 7396 7294 7391 6902 6915 6745 6522 6341 6212 6242 6032 6000 5848 5617 5644 5322 5153 5279 5101 4966 4785 4769 4640 4474 4533 4276 4174 3977 3902 3892 3697 3648 3555 3456 3317 3200 3254 3141 3044 2988 3031 2852 2751 2688 2611 2550 2469 2557 2417 2320 2368 2279 2266 2049 2164 1961 2029 1944 1864 1874 1754 1889 1785 1735 1657 1720 1596 1509 1617 1586 1549 1643 1475 1382 1413 1427 1469 1382 1275 1259 1193 1140 1173 1082 1029 1077 1034 1015 966 977 921 956 863 869 878 906 818 809 783 731 768 763 740 720 681 621 640 639 627 625 586 571 551 541 515 553 571 515 451 479 449 442 471 426 419 372 373 380 390 405 364 384 336 315 350 309 322 259 293 233 273 247 301 235 238 268 242 239 256 229 238 226 184 212 215 214 179 206 163 175 156 162 150 143 128 144 126 128 130 118 136 140 119 112 127 112 181 109 102 116 124 116 116 107 108 100 110 92 113 90 93 91 98 85 86 110 92 91 67 92 80 84 94 54 90 91 83 74 76 70 64 72 63 70 77 57 61 41 57 55 46 67 59 65 43 52 52 50 48 45 49 51 50 38 37 23 42 32 41 48 37 36 37 17 31 32 34 34 37 23 36 32 42 43 30 33 38 22 36 27 25 33 30 34 36 29 24 33 24 22 22 32 20 36 23 32 22 30 24 13 18 37 31 23 20 22 20 27 31 19 22 25 18 22 23 27 19 20 27 24 24 20 27 29 25 42 17 22 28 29 11 59 14 17 17 17 17 16 16 21 12 15 13 20 12 15 16 13 17 18 7 13 6 10 14 14 18 11 12 8 19 16 14 11 21 20 11 22 8 22 14 18 17 19 14 11 13 15 22 14 15 13 10 14 12 15 7 12 19 29 7 15 17 18 10 14 13 7 22 17 7 13 19 15 10 15 17 12 10 14 12 15 8 9 10 16 18 4 17 9 8 10 9 29 8 10 9 11 9 7 15 7 11 13 9 15 10 14 6 11 8 11 8 10 9 11 9 11 13 12 9 9 7 10 15 9 15 11 6 9 8 10 9 6 11 6 4 7 6 7 4 10 12 5 7 9 6 3 5 9 4 12 5 14 11 7 7 6 7 10 6 6 5 14 12 8 2 10 4 5 3 5 4 17 6 11 11 15 10 5 5 13 8 6 6 8 4 8 13 5 11 8 7 6 4 8 4 9 5 7 8 9 9 12 3 11 4 13 9 7 6 2 3 7 16 11 8 9 18 6 6 9 2 9 10 12 8 8 6 5 9 5 5 8 4 11 10 7 5 6 3 10 6 7 10 6 3 12 11 4 4 5 2 8 8 7 7 6 19 6 3 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0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 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 1 1 0 0 0 0 0 0 0 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 1 0 0 0 0 2 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 
];
B = [
0 0 0
 99422 89288 10134
 49070 43803 5267
 127139 114216 12923
 108811 98708 10103
 56937 51577 5360
 156630 140822 15808
 77011 70291 6720
 122587 112458 10129
 151066 137444 13622
 47202 43575 3627
 218987 185359 33628
 112084 97605 14479
 29797 27095 2702
 102550 95967 6583
 61375 57399 3976
 16750 15594 1156
 114353 107043 7310
 35644 33683 1961
 7482 6894 588
 3582 3280 302
 1840 1681 159
 1875 1770 105
 178676 167142 11534
 56535 53515 3020
 13039 12221 818
 180096 168472 11624
 62477 59129 3348
 13105 12375 730
 261445 244474 16971
 83988 79602 4386
 20738 19557 1181
 197573 185851 11722
 77645 74235 3410
 226256 213340 12916
 63891 61932 1959
 110538 106477 4061
 352849 333814 19035
 96704 93789 2915
 213983 207038 6945
 381338 361519 19819
 130845 126393 4452
 247071 236862 10209
 366076 349186 16890
 98869 95531 3338
 296185 285087 11098
 462949 441905 21044
 111726 106523 5203
 384489 374432 10057
 943415 904823 38592
 22198 21127 1071
 823945 804372 19573
 1581116 1523240 57876
 76700 73525 3175
 0 0 0
 2865047 2770412 94635
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
11 14 0 0
1 2 0 0
4 7 0 0
3 6 0 0
5 1 0 0
12 6 29 0
71 30 123 10
859 8 129 14
5880 5 169 24
33840 11 237 56
106108 8 265 76
285856 29 316 124
692315 50 372 177
1479379 60 447 256
2228349 95 494 358
2445122 170 574 545
1744682 234 811 765
802758 309 1046 1011
226549 512 1532 1469
35388 681 1867 1855
4925 970 2189 2247
2895 1458 2694 2639
3360 2165 3185 3232
3801 2842 3893 3787
4432 3793 4432 4408
5101 4647 5078 5197
5784 5606 5956 5947
6546 6671 6719 6700
7464 7661 7561 7580
8209 8366 8286 8368
8822 9334 9076 9006
9604 9846 9402 9539
9909 10389 10253 10235
10482 10734 10799 10377
10506 11052 10742 10780
10804 10981 11059 10862
10642 11879 10984 10955
10662 10958 10843 10609
10620 10960 10758 10970
10896 10805 10800 10689
11081 10719 10939 10841
11168 11354 11294 11026
11590 11332 11410 11293
11873 11693 11855 11893
12389 12514 12474 12498
13201 13220 12880 13057
13654 13732 13723 13793
14110 14350 14141 14204
14901 14771 14847 14943
15281 15272 15124 15390
15260 15284 15224 15312
15191 15328 15208 15193
14697 14909 14982 14683
14281 14004 14291 14211
13308 13088 13358 13512
12237 12393 12469 12309
11200 11258 11257 11004
9957 10171 10040 10041
8981 9068 9097 8949
7985 8068 8195 8113
7289 7191 7152 7160
6475 6378 6468 6256
5775 5929 5961 5916
5684 5694 5608 5582
5265 5522 5300 5386
5280 5234 5327 5306
5404 5580 5528 5496
8426 7660 6587 6428
5835 5924 5905 5956
6138 6250 6068 5950
5729 5697 5630 5639
5130 5143 5115 5166
5462 5483 5511 5466
3660 3742 3784 3616
3025 3011 3055 2994
2520 2486 2255 2449
2038 2002 2056 2059
1677 1679 1699 1687
1399 1434 1367 1400
1079 1055 1094 1197
705 748 726 702
380 397 406 395
28 23 19 16
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
