A = [
6254718 6353096 63968741 2901566 3149677 2993660 2725035 2710774 2647067 2514009 2392787 2261955 2179583 2094685 1998054 1925596 1850480 1769424 1711314 1641115 1563632 1508700 1452924 1396551 1388165 1446775 1405584 1397453 1461798 1418150 1396094 1369387 1327231 1309389 1275309 1238137 1212844 1179155 1141425 1112677 1077540 1039084 1010634 980302 944547 920642 891804 862199 836274 809974 777322 759410 731364 702094 684488 661528 636503 620220 599276 577686 561856 542673 520873 507593 491718 475111 461016 445896 428514 417840 402933 386444 378159 364442 350593 341961 328824 318179 308789 297804 287578 278933 269784 258618 251792 242227 234848 227719 219907 211977 206046 198027 191233 185766 179158 172698 168183 161869 155488 151310 146097 139750 135622 130971 126789 122691 118861 113786 109747 107501 103081 99756 96793 92070 89535 86105 82578 80238 77640 74734 72591 69613 66594 64656 62206 60174 57923 56736 53628 52593 50298 48701 47710 45346 43866 42378 40654 39507 38575 37116 34981 34214 33128 31606 30833 29502 28365 27629 26568 25968 24852 23847 22890 22284 21686 20850 20015 19626 18662 17842 17455 16776 15931 15620 14913 14339 13909 13234 12649 12016 11490 11201 10796 10369 10227 9888 9251 9328 8904 8724 8299 7907 7538 7322 7240 6693 6352 6444 6294 6059 5728 5523 5356 5066 4908 4689 4632 4367 4234 4074 4023 3869 3825 3624 3542 3314 3361 3271 3091 3004 2904 2722 2595 2491 2543 2442 2246 2118 2155 2074 1988 1996 1909 1920 1645 1509 1545 1417 1483 1420 1367 1321 1217 1269 1245 1145 1072 1039 1050 883 975 920 937 958 858 796 807 798 695 709 653 601 652 560 489 489 546 503 493 505 433 451 391 368 391 356 340 364 318 350 340 333 318 290 262 286 255 265 257 269 211 205 212 217 204 205 178 172 189 176 137 144 156 136 126 155 132 145 123 126 116 141 103 110 106 94 107 115 91 94 67 87 87 88 73 102 76 82 65 82 96 78 59 57 68 61 53 76 62 54 62 50 51 51 42 48 46 49 63 47 52 42 41 39 53 36 40 38 29 32 32 44 36 42 38 23 36 32 32 28 21 19 27 10 13 15 25 14 16 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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 
];
B = [
0 0 0
 132996 28100 104896
 43874 8523 35351
 337898 90034 247864
 43068 6624 36444
 49333 7741 41592
 71775 13995 57780
 125239 27593 97646
 49249 9797 39452
 333497 87381 246116
 43277 6953 36324
 54568 9752 44816
 74115 13534 60581
 156684 35811 120873
 47648 8562 39086
 381924 99152 282772
 59147 9036 50111
 67987 11543 56444
 86869 15335 71534
 200608 43726 156882
 90099 13943 76156
 463824 117207 346617
 168632 30048 138584
 171552 32019 139533
 392454 88173 304281
 811691 183371 628320
 80194 19184 61010
 3155095 788423 2366672
 19720 3566 16154
 59447 17232 42215
 48144 10212 37932
 112268 24225 88043
 25061 5251 19810
 597211 150079 447132
 24075 5356 18719
 76088 27767 48321
 52203 12101 40102
 101869 21979 79890
 11013 2565 8448
 665212 166140 499072
 56 13 43
 974 314 660
 15588 5560 10028
 131049 57552 73497
 18582 6177 12405
 12891 3756 9135
 8981 2429 6552
 43212 13726 29486
 1120121 322818 797303
 927 299 628
 29763 10635 19128
 17779 5800 11979
 10219 2909 7310
 67988 22434 45554
 1451385 467174 984211
 57729 21079 36650
 36127 11881 24246
 12411 4619 7792
 437744 160560 277184
 860092 389116 470976
 107072150 38141015 68931135
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
181 2537 15 13
48 544 1 2
155 839 0 1
586 1068 3 3
778 919 5 9
792 1230 238 98
1946 1579 991 575
3975 1709 1842 1212
31298 2071 2779 2117
252186 2374 4223 3473
835547 2666 5682 4747
1889376 3477 7348 6663
2963469 4911 8216 7820
3918468 7067 9383 8944
4300274 9519 10315 9878
4153471 12908 11689 11404
3149514 15065 13133 12668
1839961 16508 14514 14208
756066 17102 16409 16050
168918 18057 17422 17011
31936 18547 18454 18289
20227 19023 19138 19084
20724 19899 19827 19918
22156 20954 21369 21366
23573 22405 22857 22793
25128 24628 24973 24448
27963 26949 27396 27363
30920 30023 30403 30514
34538 34071 33937 33694
38286 37992 37813 38108
42878 42984 42761 42409
48769 47862 47755 47704
54255 54232 54189 54117
60587 60946 60812 60344
68437 68354 67512 67412
76799 76821 76352 75893
85299 85281 85738 85081
95888 95548 94919 95052
106268 106421 106576 106223
118755 119274 118773 117783
131819 132060 132387 131918
146645 147012 147129 145997
162640 163819 163491 162416
180178 180510 179752 180440
198332 197834 198277 198028
216057 214910 214881 215293
232815 232090 232571 232405
246933 247311 247007 246801
257793 256506 256458 256257
259523 260345 259781 259124
255342 254806 255966 254041
240688 240591 241962 240934
213989 213251 213069 211863
176643 175485 176617 174816
138722 138669 139528 137680
102139 101357 101587 101217
67754 67878 67824 67814
46893 46323 46740 46543
24414 24635 24507 24757
6039 6068 6116 6075
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
