A = [
389394 348026 1532291 403850 360497 366545 353779 357085 353333 338588 336855 339866 333039 329955 331866 327779 323974 325758 319697 317161 317336 313201 310676 319557 338156 464587 470062 483249 606954 602881 594512 594157 595547 586009 583253 577605 564571 558098 551469 539572 535694 531078 521553 520612 513372 502384 497775 490545 478852 474386 468842 458326 455534 453086 442652 438781 433736 424630 419213 412829 404938 400089 395260 387285 384990 379894 370745 366563 362685 352683 347827 345327 338179 333109 329207 321830 319241 314528 306616 302339 298682 291751 288083 285405 278528 276573 272356 267186 263350 259644 253522 249790 246010 240650 238540 235434 229651 228358 224010 219074 215768 211721 208225 205889 202146 197096 195366 192916 189552 186512 183721 180109 177092 172655 169461 169334 166071 161772 159488 157155 154338 151477 148800 145584 143987 142155 139127 137700 134982 132175 130403 127288 125421 122789 120871 117826 117434 114816 111916 111141 109575 106379 104994 102103 100698 99247 97186 95604 93822 92630 90231 89175 87747 85266 84089 82480 81692 79792 78729 77101 75761 74506 73302 72194 71036 69795 68652 67580 65756 65123 64235 63527 61494 60024 58840 58371 57157 55976 55263 54279 52963 52125 51657 49707 49577 48146 47257 46410 45549 44614 44019 43528 43206 42115 40769 40487 39703 39151 38321 37885 36865 36015 35594 35247 34414 33895 33628 32365 32288 31738 30992 31088 29730 28963 28643 28259 27605 26852 26408 26158 25571 24989 25024 24600 23811 23121 23120 22415 21986 21470 21089 20706 20581 20173 19732 19469 19093 18871 18583 18132 17723 17249 17065 17114 16601 16068 15821 15503 15455 15096 14747 14596 14213 14117 13736 13506 13508 12947 12662 12530 12332 12308 11947 11627 11647 11509 11251 10832 10829 10498 10520 10254 10120 9710 9864 9617 9396 9097 8933 8999 8763 8249 8199 8210 7809 7576 7611 7676 7327 7367 7163 6849 6955 6908 6491 6424 6397 6141 6145 5916 5889 5776 5748 5560 5492 5357 5152 5219 5081 5034 4964 4837 4582 4590 4652 4333 4403 4277 4221 4144 4076 4076 3892 3784 3740 3733 3634 3536 3413 3438 3390 3217 3263 3308 3155 3116 3123 3053 2936 3074 2810 2746 2862 2658 2658 2564 2576 2519 2421 2488 2415 2388 2308 2245 2232 2227 2092 2181 2002 2019 1963 2038 2055 1825 1803 1754 1768 1725 1686 1714 1654 1677 1597 1577 1528 1615 1461 1433 1387 1443 1452 1352 1343 1323 1298 1277 1205 1159 1127 1155 1126 1137 1091 1083 1050 1085 1048 1014 1036 942 1002 982 956 922 876 949 950 897 826 857 861 799 798 744 716 693 680 671 730 706 640 639 603 627 646 591 595 594 643 603 592 568 573 547 539 533 487 485 486 457 444 455 407 385 428 383 469 408 417 394 426 397 386 398 361 350 370 351 335 332 359 350 312 313 303 305 290 279 296 290 290 286 306 275 245 283 233 265 279 242 238 231 248 253 216 196 222 205 202 217 195 229 210 213 186 186 178 187 185 178 182 184 180 194 156 154 149 144 160 136 156 147 158 142 166 153 129 132 123 118 135 107 127 117 135 134 114 104 121 121 98 113 110 109 101 113 114 119 100 105 98 90 88 97 89 87 87 68 82 66 63 76 62 65 64 79 66 59 51 61 60 65 60 51 41 57 75 62 81 55 53 51 61 63 50 44 47 43 43 44 56 54 51 54 51 42 41 35 34 26 28 34 33 45 43 36 35 32 39 22 46 26 35 35 33 37 36 41 29 41 47 37 32 20 25 26 21 34 33 35 25 43 26 19 37 20 20 19 22 16 20 28 22 24 22 23 24 19 19 26 19 24 27 13 18 14 16 25 19 26 25 18 17 13 10 15 18 18 18 14 15 23 19 21 9 7 11 19 14 21 6 11 22 11 13 16 7 10 11 18 7 19 17 11 10 16 12 12 15 10 13 9 5 4 12 11 11 8 10 14 11 11 9 7 15 5 6 8 8 7 8 8 9 11 8 6 8 10 10 10 4 9 9 7 8 10 5 7 7 6 8 12 6 8 3 6 8 4 10 9 2 11 12 5 7 4 5 7 9 9 11 6 2 6 6 10 4 6 6 6 10 7 2 6 4 9 5 14 1 5 8 3 4 4 4 2 2 8 7 8 3 4 6 5 4 12 11 7 4 10 6 7 4 2 3 9 8 9 7 2 5 8 7 6 7 6 6 2 2 6 6 3 5 4 9 1 5 3 4 2 4 6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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 1 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 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 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
 9376 4940 4436
 17248 9103 8145
 4453 2297 2156
 58796 32225 26571
 5080 2691 2389
 7947 4239 3708
 7938 4206 3732
 16218 8633 7585
 1225 634 591
 74616 40803 33813
 9 4 5
 98 53 45
 940 502 438
 7162 3882 3280
 1009 543 466
 810 423 387
 1146 562 584
 3333 1744 1589
 134644 73898 60746
 71 38 33
 1268 726 542
 1008 552 456
 1194 632 562
 4184 2247 1937
 148996 83126 65870
 1846 1008 838
 1593 947 646
 2736 1662 1074
 73352 45167 28185
 25697 14869 10828
 26139899 16713019 9426880
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
14 225 0 0
2 46 0 0
5 65 1 0
5 93 0 0
7 80 1 0
2 100 344 70
54 148 921 180
659 209 1261 455
4362 272 1774 815
16506 358 2674 1460
40680 456 3353 2207
93861 699 4824 3523
183537 1172 6664 5127
311557 1999 9225 7803
416143 3407 12623 11405
484937 5537 17637 16314
466404 8527 23398 22650
381228 12767 31026 30746
274733 18773 40865 40605
173622 26335 51687 51851
110564 35962 63313 63463
92621 49039 75396 75554
99519 65589 88652 88872
112212 81461 102734 103077
127049 98429 116103 115155
138786 113770 126990 126883
146417 124473 137018 135910
150218 130802 141383 141179
148805 134824 140640 141119
144810 133930 139056 139195
139326 131680 134733 134966
134371 127997 131550 131057
129279 125127 127747 126421
125609 121991 124462 124362
123108 121006 122468 121770
120997 119423 120605 119727
121015 119452 120383 119471
122315 120934 122268 121192
121229 121026 121962 120457
121627 121084 121666 121645
122210 122458 122982 120451
121926 119914 121553 120326
117127 117100 117836 116756
111371 109214 111224 109567
102662 102060 102843 101369
89335 88332 88147 89311
66928 66657 66840 66703
62120 62027 62312 61800
57684 58254 58260 57763
53661 53584 54284 53980
46862 46938 47110 47236
38563 38302 38532 38593
29503 29259 29526 29482
20794 20563 20418 20653
13540 13380 13314 13194
7403 7514 7449 7418
2221 2283 2199 2314
73 79 87 87
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
