A = [
53451 48797 298313 58959 54159 59794 55062 54087 58611 54304 53757 57644 55020 53800 57757 54491 52620 56779 53543 52124 55649 52113 51541 59141 68701 101109 109468 112632 147796 154569 142800 152032 158038 146096 153534 158104 142619 148451 152451 136226 142684 147903 134086 140295 144567 131303 136466 140010 125616 130754 135152 121081 127149 131828 119424 124144 128050 115683 118780 123172 111146 114906 119250 108408 112194 115892 105117 108368 111210 100604 103888 107120 96624 100321 103393 93378 97037 99543 90231 93072 95806 86081 89446 92148 82905 86706 88844 80174 83889 85933 77337 79695 82296 74218 76702 79713 71940 74277 76653 69072 71339 73149 66088 68420 70243 63570 65955 67799 61483 63474 64753 58469 60286 62386 55866 58332 59542 53519 55131 57206 51669 53017 54365 49017 50432 52289 47076 48233 49693 44879 46425 47627 42794 44323 45374 40743 42075 43576 39206 40420 41537 37732 38701 39918 35748 36914 37630 34090 35447 35832 32689 33442 34244 30984 31561 32589 29652 30409 31078 27877 28993 29563 26560 27539 28177 25439 26054 26744 24110 24865 25571 23007 23536 24216 22006 22406 23128 20786 21303 21694 19897 20283 20796 18756 19189 19625 17821 18076 18733 16972 17231 17854 16206 16461 16896 15230 15956 15986 14382 14873 15086 13794 14148 14468 13195 13371 13648 12459 12747 13029 11891 12107 12228 11429 11370 11784 10674 10976 11139 10085 10265 10821 9676 9907 10062 9186 9443 9743 8801 8846 9234 8272 8373 8810 7652 7888 8187 7419 7690 7876 7052 7268 7378 6846 6836 7083 6519 6525 6735 6076 6176 6430 5829 6044 6117 5486 5491 5854 5327 5337 5439 4990 5158 5122 4713 4760 4920 4479 4584 4660 4315 4323 4309 4030 4226 4213 3727 4059 3955 3492 3691 3844 3347 3531 3604 3288 3367 3414 3182 3197 3230 3025 3083 3085 2872 2865 3062 2678 2872 2810 2570 2634 2754 2402 2511 2577 2411 2461 2481 2246 2336 2274 2164 2105 2172 2016 2054 2060 1901 1879 1926 1902 1923 1857 1759 1775 1799 1679 1683 1630 1518 1621 1622 1507 1508 1608 1427 1403 1379 1381 1364 1313 1310 1318 1313 1207 1252 1259 1085 1201 1180 1105 1121 1162 1090 1085 1087 1043 1013 1050 948 946 953 915 869 956 889 871 912 844 817 868 839 760 803 763 764 759 719 710 737 676 694 721 675 619 658 656 621 619 569 556 577 593 558 565 525 529 561 532 510 505 458 538 453 464 507 460 475 514 452 447 434 437 433 400 395 389 387 387 386 351 407 352 333 358 344 351 346 369 346 365 319 305 317 334 302 315 289 268 273 263 320 332 278 250 288 226 267 292 229 247 251 254 268 243 236 247 249 215 212 224 210 220 219 216 213 217 207 202 172 176 193 178 172 194 178 214 160 174 181 178 181 177 180 179 179 158 140 164 149 167 158 156 167 139 141 148 164 155 145 134 118 139 130 152 142 123 125 143 142 136 126 130 105 149 149 116 143 114 139 99 132 119 116 119 119 110 112 100 101 104 103 111 95 98 105 94 107 95 100 83 111 84 101 119 91 95 89 90 89 84 86 102 75 97 108 81 95 73 97 74 81 94 87 82 85 65 91 76 91 78 86 82 95 88 76 56 67 63 64 67 71 78 66 69 74 58 63 76 54 72 70 62 54 71 62 72 70 46 61 64 61 58 73 66 71 56 77 62 66 60 65 59 66 58 55 55 75 56 65 54 64 70 53 42 56 66 62 54 55 63 44 46 51 43 38 51 56 55 49 61 62 54 57 57 43 56 47 47 50 46 55 61 38 47 53 45 39 50 50 54 45 57 47 41 43 38 54 39 38 39 44 38 48 39 33 32 48 33 29 40 34 30 29 39 29 39 37 35 23 27 23 30 48 32 28 31 30 34 43 27 35 32 32 38 28 37 45 35 42 32 27 40 30 35 42 37 27 44 36 30 35 27 31 33 32 26 30 40 27 32 30 33 22 34 26 40 23 34 25 31 21 42 32 31 27 45 89 46 62 51 26 29 26 20 25 20 29 22 26 29 27 24 32 31 20 26 20 23 28 33 34 34 31 23 26 31 20 32 17 22 26 22 25 24 28 15 25 23 16 25 21 14 17 15 21 21 18 23 23 25 21 23 31 33 30 18 26 16 14 24 20 18 23 19 14 22 16 16 15 13 7 23 30 17 16 23 28 24 21 21 9 33 25 21 16 23 16 27 24 23 29 36 37 32 29 20 21 18 11 15 16 25 25 21 18 20 20 28 22 13 15 17 14 15 21 17 13 22 15 22 18 27 16 32 20 11 18 12 13 17 19 16 21 16 8 11 13 14 7 18 20 18 10 10 16 18 15 17 18 22 16 16 18 16 21 11 23 17 16 24 25 17 19 11 19 15 17 13 17 13 11 23 13 22 8 20 15 27 22 24 22 6 16 16 10 19 19 13 14 17 16 20 27 16 14 11 14 15 9 20 7 16 10 19 13 14 9 16 12 14 19 10 4 18 11 15 14 22 17 13 13 10 6 12 12 12 17 11 6 11 12 9 11 14 14 14 17 12 12 17 10 12 16 12 14 9 18 13 9 14 15 13 11 9 10 13 14 9 9 14 14 14 12 11 14 14 8 12 7 7 7 11 10 9 13 11 8 10 13 11 13 8 11 12 11 10 11 13 11 7 5 14 12 17 8 6 12 11 12 10 13 8 3 8 11 1 10 10 6 9 5 4 9 8 6 11 5 5 9 8 9 5 10 12 5 11 8 5 8 10 4 4 2 11 4 11 7 7 11 10 11 7 11 4 8 11 5 7 12 12 5 9 4 5 11 11 12 10 6 7 5 9 6 7 7 8 5 8 4 5 11 3 12 8 7 8 2 6 11 12 4 6 7 5 6 5 7 3 2 5 6 3 4 4 10 5 7 1 7 5 2 4 5 11 8 3 5 12 5 8 4 8 4 3 5 9 6 5 10 6 4 9 8 4 7 4 6 7 10 4 4 5 4 5 4 4 7 2 3 3 2 4 5 4 6 1 0 4 1 2 4 1 5 1 4 6 1 4 4 1 3 2 1 3 2 6 0 0 1 0 1 2 2 3 2 3 3 3 0 1 1 1 2 2 5 0 2 2 2 0 2 4 7 3 2 5 3 3 6 5 1 1 2 0 3 4 4 2 1 0 6 5 2 5 2 1 3 5 2 2 2 2 3 3 3 2 2 1 3 1 4 0 1 4 3 0 2 2 1 1 1 1 3 1 0 4 2 1 1 4 2 4 4 1 7 2 6 2 2 3 3 2 2 7 3 1 4 4 2 3 0 2 0 4 1 1 1 4 0 2 2 2 3 2 0 1 2 4 2 2 1 2 2 2 2 0 2 4 3 2 0 3 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0 0 1 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 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 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 1 0 0 0 0 1 0 0 0 0 0 0 
];
B = [
0 0 0
 10861 3881 6980
 5583 1998 3585
 27747 10494 17253
 5164 1813 3351
 4920 1751 3169
 7327 2731 4596
 10273 3804 6469
 6784 2432 4352
 28080 10712 17368
 5521 2044 3477
 5656 2134 3522
 6967 2609 4358
 13833 5351 8482
 5371 2093 3278
 30807 12158 18649
 6741 2620 4121
 7071 2833 4238
 8122 3235 4887
 16903 6670 10233
 9760 3706 6054
 35940 14352 21588
 14428 5549 8879
 12467 4678 7789
 28193 10778 17415
 42303 16655 25648
 7314 2821 4493
 170546 65900 104646
 2330 980 1350
 8819 3895 4924
 4340 1857 2483
 8939 3913 5026
 3189 1349 1840
 38303 16361 21942
 3910 1698 2212
 12071 5313 6758
 4886 2104 2782
 8433 3513 4920
 1172 494 678
 44824 19143 25681
 7 2 5
 52 25 27
 3947 1835 2112
 23303 10658 12645
 1957 861 1096
 1703 760 943
 1514 699 815
 7493 3450 4043
 104442 46473 57969
 54 22 32
 3493 1603 1890
 2490 1138 1352
 2025 920 1105
 10746 4911 5835
 133191 60329 72862
 5219 2381 2838
 4757 2150 2607
 788 362 426
 56084 25827 30257
 89892 42403 47489
 6359771 3085836 3273935
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
1 26 0 0
0 3 0 0
0 9 0 0
0 9 0 0
0 11 0 0
0 8 63 6
37 23 176 29
241 34 194 58
1111 45 289 120
3793 65 469 216
8657 85 619 395
20026 138 922 638
37989 192 1218 923
64324 342 1680 1537
85877 646 2380 2168
94286 983 3346 3074
83745 1445 4562 4477
63141 2092 5899 5869
40096 3187 7592 7481
23147 4558 9465 9467
15268 6260 11028 10944
14008 8381 12844 12696
14849 11031 14312 14293
16177 13677 15811 16175
17582 16253 17399 17638
19065 18293 19283 19047
20366 20332 20220 20210
21514 22053 21544 21418
22091 23018 22653 22597
23048 24075 23469 23285
23848 24294 23930 24061
23777 24623 23995 23791
23718 24335 24450 23886
23373 23872 23680 23232
22551 23314 22788 23048
22003 22591 22162 22395
21428 21891 21729 21394
20751 21091 20838 20886
19858 20369 20065 20271
19467 19556 19529 19687
18807 18670 19100 19147
18692 18707 18748 18623
18464 18406 18478 18382
18310 18299 18310 18210
18333 18432 18573 18106
18691 18764 18918 18957
19422 19210 19218 19099
19641 19537 19504 19691
20053 20098 20028 20051
20244 20089 20207 19987
20074 20038 20288 20257
20080 20087 20122 19965
19198 19059 19501 19513
18193 18054 18420 18254
16502 16534 16591 16533
14702 14715 14692 14521
12114 12284 12252 12188
9505 9477 9710 9675
7139 7158 7048 6935
4859 5036 5063 4999
2782 2812 2692 2665
513 540 553 531
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
