A = [
5973 6670 7572 6796 5999 6260 5990 6181 5791 5755 5873 5712 5631 5424 5139 4891 4649 4675 4514 4425 4578 7956 7590 4718 8948 8140 5017 5406 5615 5182 5148 5000 5140 5006 4768 4986 5058 4860 4976 5278 4829 4731 4937 4749 4633 4612 4530 4428 4530 4560 4359 4612 4582 4281 4421 4510 4116 4284 4178 4236 4336 4340 4258 4273 4417 4197 4111 3966 4052 4047 4007 4083 4117 4035 3846 3767 3656 3656 3471 3391 3546 3410 3318 3327 3311 3182 3068 2917 2901 2832 2680 2606 2456 2508 2431 2229 2173 2081 1848 1820 1753 1666 1611 1536 1436 1463 1299 1283 1206 1198 1157 1158 1114 1116 1047 1024 996 991 993 879 955 886 916 920 893 912 886 911 825 810 868 762 825 828 784 752 755 767 781 707 748 667 714 707 674 630 683 678 675 683 621 626 600 562 622 562 551 591 554 529 504 503 507 442 514 495 465 517 468 439 422 423 448 439 407 390 368 355 385 392 381 321 362 344 370 348 327 325 317 334 323 322 288 315 289 295 256 293 259 264 295 226 256 252 251 219 234 212 252 239 224 232 206 234 210 180 233 170 188 186 188 195 179 171 132 173 190 169 141 162 168 144 151 136 152 145 149 139 147 146 130 158 126 119 116 130 106 135 125 102 113 102 124 120 94 101 110 103 98 93 100 93 106 106 82 92 83 86 78 104 87 89 81 101 84 80 65 70 80 98 77 61 75 71 75 60 72 86 75 60 77 63 60 61 74 57 59 70 55 58 44 50 69 59 65 62 60 62 52 65 57 59 55 50 52 57 47 53 43 38 57 53 50 41 50 60 49 46 59 57 40 56 46 34 46 54 50 48 54 39 32 40 46 48 40 40 37 37 48 34 49 36 47 42 47 43 48 40 41 43 48 27 33 38 39 45 40 33 35 28 32 42 32 34 29 30 31 35 38 38 39 44 35 28 28 27 30 40 30 36 32 29 24 25 25 32 30 29 29 34 29 22 23 31 35 36 29 26 22 26 38 21 29 30 26 30 20 28 18 24 22 24 27 22 28 16 15 21 26 22 24 24 19 28 22 21 20 15 19 24 19 15 18 26 27 23 25 34 11 21 13 15 17 16 25 27 23 20 21 23 25 23 23 32 22 24 16 18 27 13 17 17 22 19 19 19 13 16 16 25 20 23 18 9 27 13 18 18 22 20 18 15 23 14 13 17 20 24 17 18 20 11 20 23 18 13 12 17 8 17 20 23 11 11 20 16 12 11 20 17 16 11 19 16 16 12 17 15 14 14 7 15 22 10 16 14 11 12 12 10 16 16 10 17 14 10 7 15 13 9 15 20 12 18 5 8 15 13 10 10 12 9 9 8 11 14 8 8 19 17 19 5 10 9 8 7 13 14 19 8 14 11 16 14 17 13 12 7 11 13 4 10 18 7 7 10 12 5 9 17 10 9 14 11 11 10 12 17 9 15 10 11 11 14 14 12 11 11 15 8 8 6 10 9 11 6 8 7 10 13 12 15 9 11 7 5 4 11 5 8 8 9 8 11 5 7 5 14 10 7 3 5 9 5 7 10 11 9 5 8 11 7 7 14 5 9 9 6 4 9 8 3 4 10 8 3 7 6 6 9 10 9 2 9 5 11 10 9 5 7 11 7 5 3 4 8 8 4 7 6 2 4 11 5 5 9 7 4 7 10 4 9 1 8 5 6 5 7 10 6 7 4 5 1 6 4 4 5 6 5 4 3 7 2 3 9 5 2 5 5 6 8 7 7 3 5 7 7 0 8 3 5 4 1 3 4 4 4 7 3 2 10 2 5 4 4 6 4 9 3 2 2 12 0 10 7 4 4 8 6 4 3 3 5 4 5 1 5 6 5 5 4 5 6 7 6 2 4 5 4 6 5 5 2 5 4 3 7 5 8 7 4 4 2 6 6 2 1 3 3 3 4 4 1 4 4 5 6 3 4 1 1 4 0 3 5 1 4 4 5 3 3 3 2 2 2 2 2 3 4 4 2 2 6 3 2 1 3 6 4 2 5 4 0 3 2 2 0 2 10 1 2 2 3 2 7 2 4 0 5 3 1 2 1 2 5 1 7 1 3 7 6 1 3 3 1 1 1 4 3 1 3 3 4 3 3 1 3 1 4 2 1 0 3 3 1 3 2 2 2 1 1 4 2 0 1 2 1 4 3 0 2 5 2 5 1 6 3 3 1 1 2 3 1 1 0 3 1 2 2 2 4 3 2 4 1 4 1 3 3 3 1 3 7 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0 0 0 0 0 0 0 1 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
 2422 2299 123
 2090 1922 168
 2039 1895 144
 2593 2427 166
 3312 2965 347
 2269 2164 105
 3307 3131 176
 7132 5894 1238
 2800 2678 122
 3832 3556 276
 6124 5187 937
 3996 3838 158
 5263 4829 434
 3113 3008 105
 3673 3539 134
 5351 5023 328
 4195 4094 101
 5172 4885 287
 4071 3962 109
 5521 5272 249
 3639 3545 94
 6188 5971 217
 5229 5107 122
 5482 5272 210
 4623 4518 105
 5713 5478 235
 6253 6074 179
 4667 4575 92
 7263 7079 184
 2287 2227 60
 145212 137936 7276
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 = [
0 6 0 1
0 1 0 0
0 0 0 0
1 1 1 0
0 1 0 0
0 1 1 0
2 0 1 2
13 0 1 2
448 0 1 2
2581 0 2 0
11239 1 0 2
90151 1 5 16
52361 11 11 12
22119 5 8 6
26984 6 13 16
25589 10 11 5
14288 19 18 18
6470 18 12 15
2933 26 20 16
1005 25 23 17
370 35 16 18
160 31 16 14
48 27 18 22
17 35 22 30
14 33 27 23
17 26 27 26
13 29 13 9
11 32 15 21
5 26 11 11
11 12 11 11
3 14 4 9
7 5 3 2
6 9 5 5
3 8 4 4
2 5 7 4
7 5 6 4
7 7 9 12
12 11 12 7
12 12 17 6
14 14 14 22
21 9 20 17
20 17 12 15
21 31 19 20
33 24 25 21
25 25 22 28
23 35 32 24
20 28 30 23
29 30 35 28
29 29 23 23
24 22 24 24
16 27 16 16
15 17 15 16
12 19 21 15
10 10 12 12
7 7 10 10
5 10 5 4
7 5 3 2
4 4 3 3
2 2 4 4
4 1 5 4
1 1 5 4
2 4 2 1
2 3 6 4
2 3 5 3
7 4 3 5
3 0 0 1
6 6 6 5
4 4 8 1
5 11 11 6
10 8 6 6
8 5 12 8
9 6 13 17
11 10 14 15
16 20 18 7
20 27 18 13
21 17 15 15
15 21 14 18
20 20 17 14
20 19 13 18
22 12 10 10
6 6 9 12
4 4 4 3
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
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 
];
