A = [
637 636 3359 710 639 620 607 618 640 647 706 885 951 1066 1401 1469 1821 1739 1975 1771 1507 1367 1414 1419 1365 1513 1518 1329 1465 1280 1225 1078 789 765 779 843 775 719 762 743 762 718 761 798 836 729 754 793 761 874 1153 821 729 792 760 764 741 734 807 710 732 711 734 754 770 760 742 686 672 655 757 761 745 738 736 720 720 695 738 697 718 707 637 706 649 692 667 632 674 620 684 575 622 642 626 589 627 613 617 567 604 584 600 594 580 566 577 591 555 581 566 539 513 487 520 532 538 488 541 500 545 510 531 525 534 492 509 537 513 549 497 476 512 519 478 475 445 481 487 502 470 474 501 464 485 457 508 470 506 469 487 440 444 439 443 426 424 423 457 432 423 453 437 436 407 437 450 420 428 455 410 390 401 393 395 431 418 398 396 395 389 398 402 385 382 387 367 427 371 394 393 374 375 389 387 383 393 393 357 350 356 400 358 361 390 350 387 346 340 351 327 341 334 345 338 355 331 312 344 323 366 332 314 334 303 301 344 364 308 282 291 308 286 283 288 315 303 302 303 272 283 302 284 306 282 264 303 269 248 258 289 273 257 263 272 283 248 258 266 249 258 227 235 237 219 229 253 214 249 248 229 190 214 210 227 214 229 240 214 215 195 202 215 208 213 228 215 195 207 217 224 196 192 196 175 180 169 187 193 185 174 186 196 177 191 192 183 180 170 179 186 163 167 201 189 189 166 194 144 186 148 151 163 176 162 146 140 192 175 167 161 149 152 171 162 160 175 138 199 151 133 151 136 162 143 132 155 149 145 139 142 157 147 167 151 128 166 142 148 144 123 148 152 141 130 135 137 135 112 120 125 116 109 112 112 91 107 122 105 115 104 98 103 116 104 100 86 113 81 92 85 95 87 75 98 65 78 101 80 72 65 70 61 64 74 70 77 71 72 67 59 81 59 62 41 59 50 51 52 53 44 47 46 48 31 39 32 33 36 24 37 33 36 28 24 39 22 33 30 24 20 22 23 25 25 35 28 12 28 17 26 22 22 20 15 13 23 11 15 13 17 17 17 13 19 12 11 7 15 12 10 16 11 16 11 9 13 7 10 13 7 10 9 10 9 13 8 5 6 7 8 9 12 6 12 11 9 5 5 4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
 165 127 38
 112 82 30
 221 187 34
 265 224 41
 180 150 30
 1278 1093 185
 331 272 59
 400 347 53
 263 223 40
 345 276 69
 361 294 67
 238 198 40
 710 581 129
 422 341 81
 404 330 74
 259 216 43
 398 326 72
 349 292 57
 650 556 94
 265 222 43
 412 342 70
 422 350 72
 214 171 43
 407 333 74
 440 368 72
 558 468 90
 261 219 42
 418 334 84
 684 579 105
 430 374 56
 295 251 44
 655 549 106
 497 409 88
 523 431 92
 212 182 30
 430 357 73
 566 487 79
 264 221 43
 582 480 102
 473 406 67
 580 492 88
 269 222 47
 563 462 101
 438 356 82
 570 486 84
 271 227 44
 584 492 92
 532 447 85
 228 199 29
 541 442 99
 405 334 71
 63315 54371 8944
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 0 0 0
 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 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
2 0 0 0
7 1 0 0
203 0 0 0
514 0 0 0
15 0 0 1
13 1 3 0
8 0 1 0
8 0 2 1
41 4 1 4
279 1 3 1
3240 5 9 10
11135 5 10 23
4362 12 17 25
272 16 28 39
56 30 30 53
67 34 63 46
77 54 60 59
65 71 67 96
119 74 70 79
91 84 89 116
133 256 117 101
173 167 141 132
145 149 130 173
186 195 188 185
216 211 174 180
221 215 206 202
218 238 241 228
278 256 249 246
313 284 286 260
263 291 247 336
258 275 269 235
265 239 283 246
261 265 265 268
265 283 299 276
309 258 287 264
326 357 301 318
316 341 354 318
361 348 354 362
339 370 363 358
375 360 369 367
407 414 414 378
402 410 387 400
400 392 401 402
432 401 365 440
387 389 394 399
414 344 373 398
356 366 364 338
401 334 320 376
310 298 305 330
295 308 319 300
239 288 301 258
252 257 264 248
240 225 216 226
211 256 206 208
208 201 211 209
183 178 202 187
188 173 171 192
240 192 206 178
222 203 212 213
215 213 208 238
803 776 361 404
258 243 248 267
278 279 268 286
306 271 289 280
271 261 273 288
249 252 268 264
211 269 230 248
210 230 185 188
146 144 165 157
113 112 101 122
81 81 86 79
64 62 58 68
44 43 57 44
40 28 32 24
19 14 22 21
2 1 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

];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 
];
