A = [
213126 208937 987942 194070 190777 183526 180938 184508 183303 179342 178877 177889 176416 176367 176603 176277 176335 176287 175549 174988 175709 173902 174948 181042 198392 266228 272225 287551 355422 356694 365318 369350 371489 381898 381712 379342 374232 370144 366215 362137 360683 358050 354788 354686 351100 347897 346959 342264 337803 334825 332436 328232 326650 324778 321375 319366 316031 312268 310153 306390 302079 300548 297626 293589 291682 289431 285185 282702 280015 277251 274069 271861 267630 265229 264098 259764 259281 254389 251807 248825 245645 241141 240092 236750 234710 233337 230188 227559 226370 222467 217573 216952 214420 210895 210988 207276 203717 202150 200969 197872 195996 194014 190701 189156 186371 183104 182271 180167 177366 174729 172969 171399 168372 166528 164827 162269 159670 157646 156591 153818 151744 149022 147368 144824 143928 141110 139782 138223 136533 134541 132422 129938 128699 127331 125684 123191 122357 119853 118157 117598 115667 112989 112150 109742 108400 107657 105405 103624 102610 100642 100294 98408 96913 95608 94508 93827 91955 90821 89360 87778 87133 85329 84266 83400 81485 80024 79178 78702 77471 76512 75689 73850 73374 71350 70680 69701 68762 68028 66502 65636 64786 63816 63406 62030 60909 60292 59599 58777 57879 56656 56049 55200 53747 53563 52690 51746 50608 49814 49986 48844 47948 47510 46976 46292 45838 44562 44084 43662 42492 42252 40813 40470 40564 39486 38772 38064 37522 37390 36576 35881 35113 34045 33941 33779 33286 32501 31772 31105 30915 30406 29836 29244 29173 28582 28091 27396 27058 26466 26571 25996 25448 25142 24443 24129 23794 23243 22927 22577 22211 21824 21317 20786 20684 20617 20387 19863 19770 19069 18618 18408 18146 17825 17572 17392 16991 16608 16162 15928 15684 15394 15283 15128 14897 14375 14270 13884 13825 13583 13326 12931 12865 12669 12540 12096 11956 11838 11465 11514 11035 11045 10874 10633 10372 10393 9972 10104 9777 9824 9569 9327 8976 9055 8918 8742 8570 8523 8270 8153 7757 7765 7646 7532 7447 7266 7184 7055 6901 6649 6457 6546 6458 6209 6345 6107 6175 6000 5638 5855 5538 5554 5589 5475 5327 5140 5081 5028 4887 4949 4665 4667 4624 4496 4360 4407 4285 4187 4121 3995 3920 3902 3800 3754 3670 3658 3708 3533 3643 3370 3447 3268 3245 3111 3115 3018 2936 2946 2993 2880 2817 2640 2798 2746 2814 2780 2621 2620 2503 2437 2361 2479 2548 2365 2361 2262 2285 2163 2241 2128 2059 2081 2059 1986 2045 1991 1977 1922 1846 1952 1837 1813 1883 1733 1630 1710 1661 1570 1636 1543 1480 1544 1465 1448 1395 1436 1374 1401 1345 1319 1295 1325 1324 1286 1342 1238 1176 1175 1230 1200 1084 1089 1159 1095 1146 1158 1042 1052 1035 1062 978 1050 991 947 937 949 894 903 906 870 875 860 875 887 840 793 815 815 856 777 750 787 767 704 776 683 713 686 701 661 672 721 647 637 732 621 618 620 666 689 620 606 589 632 564 595 599 574 568 525 541 499 563 572 551 544 538 530 507 527 516 549 530 483 495 498 462 461 499 479 499 468 438 452 485 453 462 416 480 409 445 431 442 426 398 396 407 380 403 403 403 350 393 372 376 354 381 351 348 335 310 358 373 294 349 318 343 332 359 358 331 334 344 312 333 312 279 338 361 321 294 334 298 279 345 316 334 317 260 288 296 316 338 313 308 312 297 248 287 278 302 282 296 291 278 239 242 279 266 257 218 255 239 261 227 222 213 257 231 231 243 234 240 201 190 192 201 224 200 228 201 191 145 159 178 176 146 154 176 149 174 167 137 146 137 137 148 129 135 136 148 133 150 130 141 143 143 115 136 125 126 128 120 115 108 136 90 103 105 116 96 103 96 83 106 124 114 108 102 98 100 101 82 75 76 96 91 74 94 72 95 99 90 92 105 88 74 78 95 62 52 56 72 86 70 66 65 66 64 61 51 64 65 56 69 43 47 39 61 61 60 55 70 61 67 69 69 61 53 59 60 56 39 61 57 47 53 66 36 78 68 45 42 44 33 32 36 38 40 27 42 31 30 31 46 31 46 58 35 47 41 40 67 57 52 56 59 94 59 66 58 58 60 36 51 44 41 39 62 40 53 79 44 48 42 24 30 28 25 17 27 28 24 24 24 22 23 32 32 36 30 43 33 41 21 17 21 22 17 20 16 23 21 12 21 12 10 13 13 20 16 24 24 9 20 14 8 17 14 20 15 11 12 17 10 12 13 15 11 20 17 6 20 14 11 23 13 11 13 15 6 9 23 25 21 15 12 13 5 10 11 9 10 12 7 17 12 14 9 10 12 9 11 10 12 10 5 8 12 6 7 12 8 12 13 9 10 9 4 20 4 10 11 17 8 9 6 6 10 7 5 3 8 6 8 15 10 13 8 7 5 6 6 6 7 4 9 6 3 8 10 14 14 9 12 26 12 16 5 4 7 4 4 14 9 12 12 11 10 10 5 6 16 7 12 6 4 6 10 11 10 18 4 5 10 10 4 7 3 6 6 9 12 4 5 8 8 15 11 12 8 10 6 8 11 5 9 3 13 18 11 15 13 12 4 6 10 10 12 13 13 9 6 8 8 8 7 8 9 9 9 14 12 8 5 5 1 5 11 7 10 20 3 11 8 4 11 8 5 5 9 10 11 9 6 12 10 8 10 12 9 10 5 7 14 9 8 15 9 2 5 7 10 7 8 7 6 4 4 7 3 1 3 5 4 4 9 3 6 7 4 4 2 8 7 4 9 3 5 4 8 7 4 4 1 1 5 2 1 2 4 5 4 1 7 6 7 4 8 6 3 7 4 5 2 3 5 5 6 4 3 3 5 2 2 2 5 3 3 7 13 4 6 7 4 11 7 4 6 1 5 2 4 7 6 2 12 6 2 6 11 13 6 9 5 6 5 6 7 3 2 8 2 11 15 2 4 4 6 6 10 4 3 2 7 4 2 7 7 3 2 3 11 3 9 1 3 3 4 3 2 4 6 8 3 0 4 1 1 5 3 2 3 4 1 8 1 5 1 5 2 4 1 1 6 4 0 4 2 1 1 2 0 1 2 3 4 4 2 0 2 6 2 2 3 2 3 1 1 2 3 2 0 1 0 4 2 1 2 4 1 0 2 2 1 0 0 2 0 2 1 1 0 1 2 0 0 1 0 0 1 3 3 3 1 2 1 1 3 1 1 3 1 3 0 0 0 0 1 0 0 0 1 0 2 0 2 1 4 0 0 0 1 1 2 2 2 0 1 1 1 0 0 0 0 1 1 1 1 0 2 2 0 1 0 0 2 0 1 0 0 0 0 0 0 3 4 1 1 0 0 3 1 1 0 1 1 1 2 1 1 1 0 1 0 0 1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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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 3597 925 2672
 5833 1693 4140
 3622 843 2779
 25961 7991 17970
 2258 574 1684
 7255 2177 5078
 3585 914 2671
 5107 1397 3710
 1007 302 705
 27921 8869 19052
 11 6 5
 64 22 42
 849 266 583
 7732 2355 5377
 963 312 651
 829 263 566
 1778 435 1343
 2474 683 1791
 42839 13953 28886
 63 20 43
 1127 413 714
 940 317 623
 906 239 667
 3510 1102 2408
 45594 15587 30007
 2199 907 1292
 2511 1036 1475
 7252 3808 3444
 362938 176929 186009
 15958 6739 9219
 20382388 10982396 9399992
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
6 26 0 0
1 7 0 0
2 10 0 0
4 14 0 0
1 8 0 1
6 18 81 8
261 18 212 19
1706 27 256 62
9029 30 353 100
31199 41 514 185
65912 52 643 322
128470 95 948 529
216390 197 1240 861
353152 320 1845 1427
505776 611 2809 2437
671693 1174 4328 3915
746702 1968 6119 5903
686646 3037 8267 8225
490666 4916 11410 11282
242547 7699 14503 14401
81142 11161 17837 17738
31078 15142 20635 20496
27237 20151 23985 23595
29946 25333 27636 27586
32599 29748 32018 32196
37012 35421 36064 36407
40258 39683 40142 39655
43792 44265 43872 43540
46877 47467 47286 47160
49013 49566 49351 49189
50646 52284 51681 50922
54111 53945 53458 53110
54957 54875 54953 53871
55453 55828 56139 55146
57038 58006 57232 56597
57749 58306 58881 58207
59233 59379 60015 59261
59333 59705 60093 58959
60229 60981 61210 59364
60271 62063 61432 60771
61886 62348 63115 61483
68043 67010 68171 66526
68557 67263 68350 67923
66502 67619 67156 65864
59788 58438 58928 60027
50136 48584 49486 49353
48084 48633 48540 48486
49462 49613 49538 49135
50169 50401 50184 50706
49987 49725 49585 50228
48822 49494 48849 48558
46464 47029 46744 46574
42368 42537 42370 42557
35355 35232 35423 35668
25911 26115 25797 26171
17175 16914 17219 17177
11391 11124 11387 11103
7726 7739 7750 7558
5114 5114 5163 5021
2944 2932 3014 2823
335 351 359 355
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
