A = [
469158 333206 1379867 362093 332961 335519 313087 312609 315974 308766 310754 314737 314604 314956 318427 318038 317940 323580 322059 324873 326493 325700 331258 361507 414140 805271 838920 884836 1284153 1328096 1360283 1388220 1394230 1413116 1426508 1409758 1375173 1364654 1354322 1325828 1321026 1320739 1299437 1295541 1286223 1266718 1252046 1235048 1211796 1202436 1192477 1173097 1167321 1160855 1140018 1133053 1119011 1097738 1085060 1072584 1051500 1042662 1033287 1018510 1011395 994525 977451 968605 959727 954714 963181 959510 943423 941738 928345 913633 901536 886236 869344 855925 844102 828662 819156 809076 796350 786794 776188 761196 748136 735211 718941 708270 697406 682628 678557 668559 656599 646978 634894 622301 612185 599658 587256 582306 581383 579787 571402 561247 551700 542948 532760 522587 511665 504912 494992 486811 480353 470258 463287 454230 446125 437920 431185 420691 413434 407201 398507 392875 387117 377269 371464 364715 356450 351368 342946 338490 331635 325718 318731 312377 305583 297517 292924 287055 281317 276273 272010 267497 262812 257678 252477 247790 243747 237740 234388 229581 225283 220917 217051 212233 209077 204949 200573 197981 193855 190353 187077 183785 179147 176616 173981 170486 166522 163261 160092 157893 154030 151695 148870 146223 142631 140577 137392 135147 132867 130052 127504 125275 122754 120465 118295 116457 113270 111613 109911 107305 105700 103763 101746 100235 97479 96190 94850 92857 91136 89216 87959 86109 84378 82769 80602 80306 78131 76902 75764 74078 72335 71559 70217 68622 67003 65988 64863 63604 62380 61215 59936 59044 57410 57087 55535 54878 53861 53229 51930 50905 50307 49329 48079 46756 46075 45593 44868 43324 43136 42087 41656 40803 39911 39489 39002 38281 37493 36637 35852 35070 34696 33838 33419 33046 32333 31697 30909 30367 29974 29653 29102 28642 27923 27439 27262 26437 25999 25600 25077 24753 24274 23552 23515 23495 22606 21950 21638 21467 21116 20671 20566 19863 19727 19515 19158 18688 18479 18182 17674 17419 16846 16743 16755 16418 15972 15728 15514 15138 15000 14810 14403 14017 13988 13865 13532 13299 13004 12803 12701 12435 12165 12146 11522 11444 11429 11152 11150 10653 10606 10336 10574 10136 10025 9802 9828 9550 9559 9356 9123 9107 8892 8776 8655 8533 8376 8324 8039 8001 7863 7730 7541 7492 7369 7251 7177 7053 6908 7207 7128 7595 7533 8005 11888 11041 7583 7231 6052 5885 5838 5627 5564 5470 5452 5346 5188 5377 5103 5115 5085 4924 4976 4819 4820 4711 4487 4542 4447 4422 4271 4423 4326 4142 3995 4101 4079 3935 3861 3878 3837 3859 3611 3566 3679 3466 3483 3428 3352 3334 3263 3325 3200 3235 3136 3179 3100 3055 3090 3070 2854 2989 2979 2758 2863 2854 2815 2809 2728 2640 2669 2513 2511 2492 2478 2394 2405 2368 2496 2393 2278 2332 2208 2315 2202 2329 2268 2118 2130 2079 2119 2016 2079 2010 2025 1995 1966 1925 1938 1887 1934 1876 1846 1825 1811 1779 1777 1737 1757 1679 1647 1732 1741 1653 1659 1641 1597 1559 1510 1536 1536 1533 1562 1546 1540 1517 1484 1424 1437 1358 1380 1430 1338 1313 1384 1326 1304 1255 1325 1326 1228 1237 1190 1228 1279 1164 1196 1158 1176 1141 1222 1135 1126 1116 1117 1090 1119 1006 1022 1007 1079 1068 1089 1060 1067 1050 1022 1010 971 1056 999 975 991 932 968 940 965 899 905 975 893 870 859 952 979 859 898 824 837 844 789 857 825 826 822 822 775 824 814 795 754 771 769 760 739 773 748 780 771 724 678 707 711 716 700 664 689 753 651 696 729 673 666 643 644 674 657 649 624 637 663 618 630 617 617 603 557 578 579 570 640 570 548 554 601 573 590 547 593 582 587 581 595 561 537 554 514 532 493 519 516 515 466 509 509 528 515 496 531 502 558 510 536 514 445 416 492 485 514 482 480 483 449 416 452 448 484 431 400 457 453 432 440 397 477 411 402 426 433 429 430 448 421 398 364 387 397 381 370 434 376 398 393 394 355 336 421 324 367 411 347 423 363 406 374 343 349 404 311 351 321 303 332 338 324 352 358 327 332 331 319 307 305 308 329 343 288 327 282 322 293 297 274 265 299 311 284 289 296 269 282 283 282 299 294 267 266 294 215 246 264 256 260 247 304 283 279 246 258 269 263 275 261 233 263 258 256 217 261 243 237 248 191 229 216 227 208 232 225 216 214 208 234 178 251 198 175 221 171 200 222 199 208 202 209 202 228 197 165 190 196 568 392 346 829 384 248 234 205 211 182 232 195 176 176 214 224 176 190 195 217 182 174 194 195 177 199 164 166 184 159 162 184 156 163 149 147 158 179 143 144 162 176 151 148 138 158 155 154 145 154 164 160 134 160 157 144 152 140 130 134 157 141 111 137 140 124 140 139 148 145 112 126 131 107 130 112 127 136 145 108 127 109 127 109 129 105 116 112 114 120 114 106 110 117 127 137 124 113 93 117 120 109 101 92 105 117 102 87 116 116 113 123 98 100 95 100 116 109 98 103 90 81 93 104 117 100 88 92 107 82 88 87 94 79 96 108 103 85 112 93 104 97 61 79 75 93 89 103 80 99 104 75 95 91 101 90 101 81 87 75 84 71 91 88 82 94 87 80 69 94 65 87 74 76 59 66 63 72 59 72 94 79 67 71 83 71 57 76 64 71 70 75 81 61 89 69 68 61 60 73 50 66 72 58 71 71 54 59 65 67 69 73 61 58 64 54 68 62 67 52 66 52 74 69 72 53 63 68 70 72 70 61 51 53 69 64 62 69 56 59 54 66 69 73 55 59 50 45 52 54 61 66 64 72 71 59 65 57 49 57 51 66 53 51 47 42 48 35 52 45 41 56 51 47 57 46 49 44 51 41 49 52 43 55 54 32 35 48 40 23 40 44 40 40 44 47 38 35 40 41 42 31 38 22 29 26 44 30 37 28 30 34 41 25 43 41 33 46 43 36 50 31 37 39 34 48 32 52 30 29 44 36 36 36 37 36 37 31 30 36 36 30 41 33 36 35 40 49 38 35 29 25 26 22 32 19 28 28 23 38 19 22 24 25 28 26 28 39 28 32 28 24 30 28 25 18 23 26 17 28 25 19 17 18 20 18 24 14 19 21 27 27 22 27 23 14 19 27 17 24 17 18 25 21 22 19 25 28 27 20 22 19 19 26 30 28 27 31 34 32 25 13 32 31 29 16 25 19 17 25 23 21 17 16 11 10 24 12 21 23 18 15 13 16 22 12 13 22 19 10 18 13 15 22 20 16 13 19 18 24 24 13 16 25 20 15 17 38 22 28 31 29 17 18 22 25 16 22 20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 3 3 1 1 3 1 0 1 0 2 2 2 1 2 2 3 2 2 0 0 3 0 2 0 2 1 4 2 3 0 1 3 0 0 0 0 3 0 0 1 2 3 0 1 1 0 1 2 0 1 0 3 0 1 3 1 0 4 3 0 1 0 2 2 1 1 0 2 3 1 1 0 2 1 0 1 3 2 1 1 1 0 1 1 0 1 0 1 0 1 0 1 1 2 0 0 1 0 2 0 0 0 2 5 2 1 1 4 0 0 0 0 1 0 1 0 2 0 1 2 4 2 0 1 0 2 1 2 0 2 0 2 2 1 2 1 0 1 4 1 0 1 0 5 4 0 3 1 1 1 1 0 1 1 1 0 1 1 1 0 0 2 2 0 0 0 1 1 1 0 0 1 1 0 0 3 9 2 1 3 6 6 2 0 3 0 1 0 1 1 1 0 1 1 2 0 0 0 2 1 1 1 2 0 0 2 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 0 0 0 
];
B = [
0 0 0
 935320 55274 880046
 415596 23612 391984
 1812570 132265 1680305
 403514 22591 380923
 422259 23742 398517
 557103 32563 524540
 852042 55270 796772
 501494 29012 472482
 1741905 132766 1609139
 458494 26907 431587
 500729 29603 471126
 557492 35094 522398
 1001906 68474 933432
 452840 27724 425116
 1768539 140209 1628330
 498479 32850 465629
 543765 36914 506851
 564710 39464 525246
 1075956 78336 997620
 600739 42688 558051
 1817801 147142 1670659
 846747 61547 785200
 670356 49586 620770
 1483635 110010 1373625
 2669808 207255 2462553
 331226 23809 307417
 9094068 757016 8337052
 101929 9703 92226
 178715 15319 163396
 166818 15197 151621
 345618 31983 313635
 95733 7994 87739
 1183792 108249 1075543
 86318 7880 78438
 163848 14434 149414
 156488 13831 142657
 343210 31265 311945
 33011 2089 30922
 1489277 130275 1359002
 42 3 39
 1848 225 1623
 16745 1459 15286
 150789 13947 136842
 18499 1711 16788
 17310 1601 15709
 28037 2170 25867
 66261 5187 61074
 2282234 206736 2075498
 1213 122 1091
 16765 1700 15065
 14524 1425 13099
 20233 1901 18332
 64844 5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 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 
];
D = [
12 105 1 1
1 22 1 1
7 45 1 0
13 42 0 0
12 39 2 0
16 56 672 43
663 71 1825 224
5473 94 2371 457
23256 110 3167 1005
71039 146 4529 1804
160453 221 5501 2778
331691 386 7262 4221
548936 570 9448 6685
786407 1034 12772 9983
886115 1875 16368 14089
854876 3410 21961 20476
651769 5430 27348 25697
407945 7495 31268 30041
220538 9853 35522 35048
104432 13072 37216 36493
53537 15900 36907 36168
37181 18930 35138 34435
31718 20528 31413 30967
26804 20858 26568 26447
21835 18697 21627 21754
17224 15979 17062 16713
12690 12255 12750 12521
9360 9027 9211 9203
6436 6121 6307 6229
4226 4094 4190 4034
2692 2529 2671 2583
1610 1538 1641 1607
940 974 954 921
549 549 520 512
341 309 332 317
164 192 178 167
80 93 103 76
35 31 16 21
12 8 20 10
6 13 3 8
2 3 0 1
0 1 2 0
0 1 2 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
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
