QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#800835#3823. Mountain hikerlc202204AC ✓35ms8324kbC++141.5kb2024-12-06 16:03:562024-12-06 16:03:57

Judging History

This is the latest submission verdict.

  • [2024-12-06 16:03:57]
  • Judged
  • Verdict: AC
  • Time: 35ms
  • Memory: 8324kb
  • [2024-12-06 16:03:56]
  • Submitted

answer

#include <iostream>
#include <cstdio>
#include <queue>
#include <vector>
#include <cassert>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 1005;
const int inf = 0x3f3f3f3f;

int n, m;
struct Edge {
	int to, val;
	Edge (int _to = 0, int _val = 0) :
		to(_to), val(_val) {}
};
vector<Edge> e[N];
int ind[N] = {0};
int idx[N] = {0};

void topo() {
	queue<int> q;
	for (int i = 1; i <= n; i++)
		if (ind[i] == 0)	
			q.push(i);
	int cur = 0;
	while (!q.empty()) {
		int h = q.front();
		q.pop();
		idx[h] = ++cur;
		for (auto i: e[h])
			if (--ind[i.to] == 0)
				q.push(i.to);
	}
	assert(cur == n);
}

vector<Edge> g[N];

int s1, t1, s2, t2;
int f[N][N] = {{0}};

int dfs(int x, int y) {
	if (x == y)
		return inf;
	if (x == s1 && y == s2)
		return 0;
	if (f[x][y] != -1)
		return f[x][y];
	f[x][y] = inf;
	if (y == s2 || (idx[x] > idx[y] && x != s1)) {
		//先移动 x
		for (auto i: g[x])
			f[x][y] = min(f[x][y], dfs(i.to, y) + i.val);  
	}
	else {
		for (auto i: g[y])
			f[x][y] = min(f[x][y], dfs(x, i.to) + i.val);
	}
//	cout << x << " " << y << " " << f[x][y] << endl;
	return f[x][y];
}
 
int main() {
	scanf("%d%d", &n, &m);
	for (int i = 1, u, v, w; i <= m; i++) {
		scanf("%d%d%d", &u, &v, &w);
		e[u].push_back(Edge(v, w));
		g[v].push_back(Edge(u, w));
		ind[v]++;
	}
	cin >> s1 >> t1 >> s2 >> t2;
	topo(); 
	memset(f, -1, sizeof f);
	int ans = dfs(t1, t2);
	if (ans != inf)
		cout << ans << endl;
	else
		cout << "NIE" << endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 7684kb

input:

5 5
1 3 1
2 3 1
3 4 1
3 5 1
1 4 3
1 4
2 5

output:

5

result:

ok single line: '5'

Test #2:

score: 0
Accepted
time: 1ms
memory: 7704kb

input:

4 5
1 2 1
1 3 1
1 4 1
2 4 1
3 4 1
1 4
2 3

output:

NIE

result:

ok single line: 'NIE'

Test #3:

score: 0
Accepted
time: 4ms
memory: 7888kb

input:

1000 5158
400 192 937792
588 969 275550
113 344 531775
722 267 449548
521 87 915571
10 684 666840
779 550 949875
994 641 522415
7 941 516498
199 938 236042
50 173 557405
779 948 733248
245 469 541016
757 340 98317
199 192 830521
604 565 91555
700 855 730446
713 826 686874
612 678 134861
475 451 9826...

output:

3358368

result:

ok single line: '3358368'

Test #4:

score: 0
Accepted
time: 7ms
memory: 7928kb

input:

200 9867
87 136 809018
28 71 8747
4 191 451168
81 22 827350
167 109 310265
101 188 580198
162 107 242207
102 86 839075
187 15 843086
31 157 205597
93 181 552677
30 54 31659
85 169 101505
195 123 280364
114 136 578406
28 143 263290
6 60 404091
168 41 576716
198 90 972499
78 165 210023
150 37 796945
1...

output:

184423

result:

ok single line: '184423'

Test #5:

score: 0
Accepted
time: 5ms
memory: 7888kb

input:

200 6915
167 96 329824
155 187 457687
47 68 265967
22 125 515538
63 104 452466
51 24 327972
173 198 885709
186 194 871001
89 81 251890
155 101 410425
86 68 484259
184 187 75308
47 73 642312
134 87 73215
13 195 877007
145 96 546172
1 185 904666
26 113 315332
140 71 632785
136 178 969599
105 180 47084...

output:

923767

result:

ok single line: '923767'

Test #6:

score: 0
Accepted
time: 4ms
memory: 7948kb

input:

200 8463
79 187 235941
59 46 95250
12 14 754505
139 9 519858
111 46 851820
192 183 530521
167 60 130860
56 178 568890
104 141 282474
107 39 420037
170 79 587082
48 6 928556
56 57 260945
71 87 18338
37 130 789219
165 23 751977
111 48 691283
176 194 362889
122 140 291975
124 18 781033
129 72 759631
1 ...

output:

508411

result:

ok single line: '508411'

Test #7:

score: 0
Accepted
time: 0ms
memory: 7800kb

input:

200 5304
30 23 362156
8 74 88939
132 96 693493
44 49 593940
6 160 42074
22 109 323129
143 192 703282
154 112 103948
74 58 711267
32 135 369651
51 89 92856
44 176 397172
10 48 339086
77 66 710213
73 100 371703
111 199 764842
109 155 262418
46 182 530151
119 68 688549
132 177 148530
189 132 763422
113...

output:

505341

result:

ok single line: '505341'

Test #8:

score: 0
Accepted
time: 4ms
memory: 8148kb

input:

200 5866
166 8 4611
35 40 300900
109 187 687781
149 70 399314
7 4 131536
128 38 131386
5 160 123187
194 118 654070
18 165 460882
182 157 627425
167 76 355235
199 108 167379
148 199 1371
141 170 945261
44 196 799748
15 184 576218
17 43 170336
109 106 714695
161 192 46449
171 59 80921
78 62 184363
111...

output:

361492

result:

ok single line: '361492'

Test #9:

score: 0
Accepted
time: 0ms
memory: 7824kb

input:

200 5603
96 98 540643
92 155 536789
41 126 874229
10 8 669644
40 60 877909
94 189 540901
14 154 447335
171 182 99603
59 8 161481
13 53 278523
83 131 16360
146 136 996777
191 21 288364
2 33 853253
3 165 937513
54 51 666661
188 61 709769
185 15 517301
172 135 823382
2 164 711283
89 44 183564
141 21 15...

output:

456396

result:

ok single line: '456396'

Test #10:

score: 0
Accepted
time: 0ms
memory: 7884kb

input:

200 8798
65 145 355982
175 124 947514
14 80 23839
190 72 905469
186 29 674196
133 108 809243
169 144 550066
47 167 567165
146 193 551692
126 15 555772
22 29 968465
100 141 561760
92 143 507952
130 141 784278
71 116 744515
71 80 922181
115 58 253896
59 186 187516
39 103 237644
185 161 978740
189 73 5...

output:

644624

result:

ok single line: '644624'

Test #11:

score: 0
Accepted
time: 13ms
memory: 7940kb

input:

1000 8476
423 682 915664
343 982 419321
596 568 370336
797 33 13811
212 939 307628
936 554 252763
616 704 923726
799 781 23749
35 30 120895
784 127 462364
519 299 207252
242 872 423500
451 427 695558
269 318 472363
760 863 708346
574 680 155578
423 377 399607
617 209 912257
426 232 280287
787 943 65...

output:

1735231

result:

ok single line: '1735231'

Test #12:

score: 0
Accepted
time: 11ms
memory: 7868kb

input:

1000 5884
629 542 130559
369 248 425222
447 595 149189
985 738 169337
910 698 520433
749 520 333870
444 268 164495
349 881 996601
366 614 403173
436 800 146488
220 110 523744
555 543 159694
349 800 736400
148 666 814602
871 579 257794
80 949 198539
788 10 833742
733 242 947624
650 661 530732
195 507...

output:

3940699

result:

ok single line: '3940699'

Test #13:

score: 0
Accepted
time: 0ms
memory: 7800kb

input:

1000 2901
433 528 409951
369 714 963943
602 967 16297
14 641 595928
703 151 52404
720 289 202644
696 655 813029
515 179 978211
297 47 319448
614 653 695650
952 258 499101
410 358 645326
73 574 41501
929 407 761243
982 380 484055
574 104 323414
845 914 26977
649 794 563506
78 224 936924
809 268 21806...

output:

NIE

result:

ok single line: 'NIE'

Test #14:

score: 0
Accepted
time: 4ms
memory: 7912kb

input:

1000 7047
581 967 139515
493 642 959418
612 948 616804
91 920 668515
865 268 253538
544 301 566523
859 516 111475
266 13 902916
181 303 270522
43 705 161506
784 837 999458
822 260 465465
193 208 555796
691 325 255897
821 467 64780
659 721 521296
980 999 854462
459 830 222437
715 265 895265
679 124 1...

output:

NIE

result:

ok single line: 'NIE'

Test #15:

score: 0
Accepted
time: 0ms
memory: 8064kb

input:

1000 2738
459 586 970271
231 601 546895
474 809 772605
749 775 861274
936 443 966177
898 271 883006
746 5 730060
74 447 138142
496 247 471277
132 576 36959
38 610 784024
441 990 215530
691 434 481747
744 785 760661
869 278 371231
452 273 137590
167 484 186822
719 658 210833
195 565 962809
696 248 27...

output:

NIE

result:

ok single line: 'NIE'

Test #16:

score: 0
Accepted
time: 4ms
memory: 8000kb

input:

1000 7886
397 434 505802
469 152 914018
272 119 803213
65 446 821598
493 623 511077
256 312 668646
349 184 382027
535 239 450134
561 334 761289
675 321 588898
29 39 551409
940 122 621862
234 297 74815
507 916 662658
192 368 712897
112 952 114731
120 624 799559
311 920 23039
871 9 13865
796 681 31280...

output:

3149225

result:

ok single line: '3149225'

Test #17:

score: 0
Accepted
time: 0ms
memory: 7924kb

input:

1000 8971
984 309 999834
467 227 891835
415 603 28389
113 219 257318
151 668 315542
3 420 661176
421 8 398203
49 389 583647
199 513 851529
110 670 934313
936 998 715806
145 69 642159
737 389 685292
234 152 572795
383 916 199972
457 733 502882
215 851 803154
745 790 873072
981 29 804819
421 226 67616...

output:

4016563

result:

ok single line: '4016563'

Test #18:

score: 0
Accepted
time: 5ms
memory: 7888kb

input:

1000 5077
663 942 195572
703 911 232345
821 897 878944
803 491 423859
296 167 911874
587 178 318607
931 416 359165
517 341 189640
522 27 571496
755 8 499001
355 295 460733
342 352 437326
396 552 709479
782 670 197244
543 319 402177
821 594 94477
374 502 627972
757 709 689560
550 893 114102
197 509 2...

output:

3639032

result:

ok single line: '3639032'

Test #19:

score: 0
Accepted
time: 1ms
memory: 7628kb

input:

1000 101
97 283 116088
458 910 550645
708 5 139057
977 106 561040
912 482 848848
340 224 208405
191 580 345028
408 745 713201
806 662 944820
936 905 958158
721 18 63965
437 325 631743
262 98 318500
748 198 80133
982 53 637095
664 473 695953
43 842 80475
340 107 730594
1000 556 993590
937 943 55904
8...

output:

NIE

result:

ok single line: 'NIE'

Test #20:

score: 0
Accepted
time: 4ms
memory: 7864kb

input:

1000 6273
984 22 927423
52 719 734135
617 693 936380
125 978 72766
83 512 362259
281 469 978510
291 161 885811
545 418 607332
935 877 969117
47 950 339720
436 849 20220
53 566 42302
990 321 248440
700 619 386234
238 459 482717
586 916 45239
971 717 389744
728 266 766703
492 33 285053
79 38 848213
66...

output:

3255697

result:

ok single line: '3255697'

Test #21:

score: 0
Accepted
time: 2ms
memory: 7820kb

input:

1000 4573
64 290 199177
666 782 230664
919 618 9265
974 689 425822
454 55 572390
943 648 239870
902 966 967142
931 397 368732
282 199 558906
39 471 940364
316 615 220794
947 581 255137
225 855 525870
901 287 840475
694 2 466836
131 373 971319
8 488 49080
887 400 990969
870 389 100818
262 491 614985
...

output:

NIE

result:

ok single line: 'NIE'

Test #22:

score: 0
Accepted
time: 0ms
memory: 8100kb

input:

1000 3568
208 101 463592
443 264 530048
424 627 659922
215 425 383248
69 967 767908
709 371 480545
375 585 532863
651 906 662501
18 311 728602
530 325 202465
490 336 683096
684 989 207538
374 72 295475
419 654 363516
626 286 967652
666 469 230424
771 663 634928
955 458 262589
830 75 107203
448 311 1...

output:

NIE

result:

ok single line: 'NIE'

Test #23:

score: 0
Accepted
time: 9ms
memory: 7924kb

input:

1000 9404
317 817 566624
451 480 33809
69 506 579027
801 666 393482
206 616 683061
59 558 813164
438 76 77545
762 865 914203
540 910 951840
468 640 398423
196 8 616625
297 383 144777
97 825 358128
160 91 697705
328 338 564719
162 326 588375
499 515 596392
421 649 876367
729 218 488191
648 950 787438...

output:

4165695

result:

ok single line: '4165695'

Test #24:

score: 0
Accepted
time: 0ms
memory: 7792kb

input:

1000 548
67 378 414159
341 562 435812
587 758 246968
919 122 466244
557 687 928852
779 505 471941
357 520 899163
527 311 851947
209 893 371021
120 806 253013
987 931 492977
131 354 93348
172 419 685639
56 446 805188
391 5 169372
540 340 982168
357 562 715970
537 884 213149
359 463 915594
638 957 279...

output:

NIE

result:

ok single line: 'NIE'

Test #25:

score: 0
Accepted
time: 2ms
memory: 7748kb

input:

1000 3436
581 877 342880
619 472 21341
399 2 704124
164 544 402943
333 534 170487
61 565 510879
101 537 139721
132 127 171202
936 208 325703
534 19 862289
581 211 730087
677 388 550079
899 489 971079
447 461 823650
176 781 878488
971 522 530958
387 610 343656
946 645 658708
196 106 131015
76 532 742...

output:

NIE

result:

ok single line: 'NIE'

Test #26:

score: 0
Accepted
time: 3ms
memory: 7956kb

input:

1000 7694
207 218 917493
434 432 600107
954 639 134291
158 547 524917
762 19 619984
824 345 517978
621 13 87934
995 841 296244
11 489 999415
127 797 872480
872 668 7791
760 176 187704
233 361 310939
930 879 98671
351 288 594243
298 840 112537
583 738 719822
195 226 200739
759 889 85981
923 343 39921...

output:

NIE

result:

ok single line: 'NIE'

Test #27:

score: 0
Accepted
time: 2ms
memory: 7792kb

input:

1000 2622
924 894 29662
701 414 649723
872 205 229261
238 573 567339
664 951 762863
433 947 708512
266 844 278405
358 917 321811
895 315 141838
121 868 108279
978 873 869205
378 469 349510
962 871 662296
119 82 460892
468 147 727939
631 893 766386
435 588 531290
585 553 811685
467 568 981769
175 174...

output:

NIE

result:

ok single line: 'NIE'

Test #28:

score: 0
Accepted
time: 3ms
memory: 7916kb

input:

1000 5016
709 86 824846
246 713 786749
918 484 230723
812 479 232142
744 577 257144
197 961 557629
966 75 487780
519 644 416419
517 854 782503
939 955 119284
119 791 279264
110 508 420240
157 894 954057
569 64 326155
256 567 847073
992 8 594316
32 150 712310
950 681 188566
707 837 198515
332 545 374...

output:

NIE

result:

ok single line: 'NIE'

Test #29:

score: 0
Accepted
time: 0ms
memory: 8212kb

input:

1000 7739
461 457 498277
222 184 358899
735 448 880987
320 203 722884
520 399 180409
220 415 378805
555 182 900087
952 304 238892
597 803 597352
521 657 919558
901 795 566401
615 482 222164
699 652 402394
862 467 819491
910 474 377422
578 257 962435
621 242 874067
62 239 138875
784 501 322854
29 164...

output:

NIE

result:

ok single line: 'NIE'

Test #30:

score: 0
Accepted
time: 4ms
memory: 8000kb

input:

1000 7859
265 540 32538
735 44 436662
91 604 387406
202 154 446123
106 310 342582
539 549 792783
810 759 568454
149 813 578051
498 550 755969
907 165 651420
902 734 713422
121 466 249579
269 266 67743
510 575 758542
275 215 21041
532 461 543881
9 128 802969
41 516 782028
552 746 669249
381 792 80056...

output:

NIE

result:

ok single line: 'NIE'

Test #31:

score: 0
Accepted
time: 1ms
memory: 7660kb

input:

1000 671
341 973 509338
682 392 875416
496 49 485402
829 653 505991
986 48 544965
861 725 112097
307 479 875780
309 548 904550
377 78 850090
442 106 9592
471 777 20638
822 489 705262
22 121 930135
667 661 729214
637 47 955658
122 470 917802
255 930 449191
360 284 521897
993 980 347334
595 828 998924...

output:

NIE

result:

ok single line: 'NIE'

Test #32:

score: 0
Accepted
time: 0ms
memory: 7928kb

input:

1000 8242
42 71 506929
854 17 992624
114 273 302838
30 541 191252
995 984 419428
919 375 31835
799 795 309413
247 17 30755
557 861 110348
354 110 65795
447 632 270233
793 156 563454
695 784 386146
807 627 44964
731 878 592010
703 424 956757
505 357 555540
211 348 578155
86 928 503788
772 323 628640
...

output:

NIE

result:

ok single line: 'NIE'

Test #33:

score: 0
Accepted
time: 2ms
memory: 8032kb

input:

1000 1740
365 434 523741
716 641 860028
280 699 343604
507 553 64446
275 37 958421
384 173 437736
623 140 842998
443 206 588208
781 776 976344
578 863 636842
93 14 417637
453 609 103607
841 325 308657
368 262 142474
787 317 478265
154 601 133573
847 650 344143
317 198 25743
525 962 927795
23 703 868...

output:

NIE

result:

ok single line: 'NIE'

Test #34:

score: 0
Accepted
time: 0ms
memory: 7900kb

input:

1000 4232
342 484 292257
355 905 423734
471 902 217521
925 622 322152
154 464 273131
845 817 629238
601 32 709648
767 510 285692
516 268 931424
814 590 146555
103 873 389843
801 234 802311
584 437 259001
447 573 518994
737 268 158960
911 808 156829
646 934 957467
418 835 532600
465 739 574560
249 87...

output:

NIE

result:

ok single line: 'NIE'

Test #35:

score: 0
Accepted
time: 0ms
memory: 8060kb

input:

1000 2343
978 414 781564
780 585 127179
880 482 610051
452 661 671500
964 624 64020
436 40 379683
750 224 156353
96 984 601874
502 724 859568
622 68 105278
206 958 934228
197 356 680930
414 931 238983
828 903 281075
515 416 870774
156 398 240702
426 716 516321
222 724 168633
467 785 496555
650 525 5...

output:

NIE

result:

ok single line: 'NIE'

Test #36:

score: 0
Accepted
time: 3ms
memory: 7884kb

input:

1000 6544
98 909 389624
956 385 57196
450 748 525439
266 57 767011
830 536 19026
318 475 798032
24 325 88485
266 588 242286
869 772 366671
252 242 774478
384 556 724249
123 546 203667
156 243 986766
319 42 57757
107 570 769819
772 369 298858
566 861 324978
197 461 812767
778 299 988185
931 548 16984...

output:

NIE

result:

ok single line: 'NIE'

Test #37:

score: 0
Accepted
time: 0ms
memory: 7644kb

input:

1000 1488
799 927 681495
305 356 495816
220 771 471360
792 858 59990
429 988 673457
544 318 234303
531 757 523533
318 547 352252
643 85 149425
48 300 509871
880 646 639723
857 548 505132
553 319 977595
81 665 402305
613 350 652068
88 456 868778
129 370 31027
47 360 42603
426 433 353678
370 427 18530...

output:

NIE

result:

ok single line: 'NIE'

Test #38:

score: 0
Accepted
time: 10ms
memory: 8056kb

input:

1000 9773
160 211 917218
484 201 773073
996 287 520057
766 816 861787
319 939 792097
867 715 591842
650 60 437707
1 534 415227
53 330 695075
502 292 664974
776 132 282061
528 872 635253
991 224 286052
501 714 366780
433 64 452919
694 459 458362
677 425 905970
199 608 449507
280 900 226057
383 268 84...

output:

1749091

result:

ok single line: '1749091'

Test #39:

score: 0
Accepted
time: 0ms
memory: 7764kb

input:

1000 3306
393 814 268169
59 711 950413
791 612 621098
709 412 892506
231 436 534405
798 130 632910
270 925 667427
54 848 983208
904 89 293203
292 84 490651
132 733 491544
915 117 415598
82 141 681075
799 423 736780
45 564 776770
86 984 570171
955 277 850658
927 208 521269
181 682 875132
49 575 78255...

output:

NIE

result:

ok single line: 'NIE'

Test #40:

score: 0
Accepted
time: 3ms
memory: 7844kb

input:

1000 6791
896 96 980502
726 273 295189
499 337 133484
920 890 268026
262 506 804427
237 885 964276
130 531 391762
878 715 389728
329 337 627232
820 21 781664
805 520 561601
505 714 860993
992 123 775647
201 98 683240
899 345 371362
896 957 96392
485 951 662717
987 416 771421
846 726 379855
623 783 3...

output:

NIE

result:

ok single line: 'NIE'

Test #41:

score: 0
Accepted
time: 0ms
memory: 7876kb

input:

1000 5507
782 690 291547
38 104 639885
635 49 257526
806 387 640401
904 557 486433
98 656 201708
944 632 33916
153 912 317919
81 700 851256
536 312 203061
696 468 535446
126 716 817975
284 454 618640
146 188 426580
110 775 777729
776 248 99246
281 886 865841
61 594 206381
773 125 875124
816 800 3141...

output:

NIE

result:

ok single line: 'NIE'

Test #42:

score: 0
Accepted
time: 0ms
memory: 7972kb

input:

1000 8907
123 692 945541
278 598 648515
997 362 191685
858 902 111715
736 299 957674
487 938 546146
917 699 777427
819 98 234797
365 921 286429
560 412 383504
384 621 68523
835 936 309659
770 144 921702
245 130 4192
364 634 652326
809 157 743944
776 947 445541
903 530 266834
703 329 203713
837 284 9...

output:

NIE

result:

ok single line: 'NIE'

Test #43:

score: 0
Accepted
time: 4ms
memory: 8044kb

input:

1000 9613
162 689 67337
750 57 685844
629 92 667123
500 422 980256
770 638 203482
112 233 672722
784 263 322896
420 271 869546
41 731 872809
603 22 148570
913 408 737455
765 525 214854
335 619 912734
205 244 274345
326 280 205395
979 607 48885
423 654 502435
737 807 565137
962 181 863755
938 220 658...

output:

NIE

result:

ok single line: 'NIE'

Test #44:

score: 0
Accepted
time: 10ms
memory: 7980kb

input:

1000 9715
562 990 79395
987 970 287574
42 41 233008
590 197 222368
127 675 908646
852 509 707622
647 130 817866
778 882 204787
647 123 744301
81 866 462847
977 943 109601
317 781 565563
576 60 590599
461 869 839232
503 312 304931
667 525 971687
839 106 115992
482 135 295066
728 715 108069
947 374 28...

output:

1651708

result:

ok single line: '1651708'

Test #45:

score: 0
Accepted
time: 2ms
memory: 8056kb

input:

1000 3306
619 467 106788
64 675 175768
323 186 945138
298 563 181607
514 302 482842
154 299 490353
509 118 656723
921 162 720606
659 312 360046
976 945 289657
488 985 26118
470 866 951024
624 144 563660
343 504 495301
534 591 971430
352 36 445620
196 213 955927
44 530 215016
865 283 876183
722 429 4...

output:

NIE

result:

ok single line: 'NIE'

Test #46:

score: 0
Accepted
time: 0ms
memory: 7824kb

input:

1000 1717
827 675 460458
928 724 134894
780 769 100939
45 178 730037
233 442 646978
589 632 67490
830 849 429577
433 264 959914
318 253 743237
544 520 583219
989 722 947277
827 715 590299
871 983 470942
283 558 134217
690 752 289939
960 522 472320
548 972 461214
889 871 504269
280 590 530992
40 225 ...

output:

NIE

result:

ok single line: 'NIE'

Test #47:

score: 0
Accepted
time: 2ms
memory: 7744kb

input:

1000 962
841 560 51803
760 143 287380
645 184 967272
700 672 560073
333 971 674815
837 442 97950
962 387 749782
625 405 697123
165 745 150598
540 188 580484
599 535 46040
137 999 357678
369 891 652355
629 243 231496
31 49 722631
933 75 792190
818 225 747799
545 104 118951
735 953 783780
147 621 4119...

output:

NIE

result:

ok single line: 'NIE'

Test #48:

score: 0
Accepted
time: 0ms
memory: 7788kb

input:

1000 3151
961 265 271680
6 627 400132
319 721 866394
222 333 302600
279 940 112356
381 451 869121
529 559 405864
361 326 840300
670 426 325068
926 116 813536
969 693 314944
23 419 533963
829 482 509464
721 714 136102
365 32 668546
249 437 833714
969 808 561968
784 544 196173
109 142 747055
831 62 44...

output:

NIE

result:

ok single line: 'NIE'

Test #49:

score: 0
Accepted
time: 3ms
memory: 8120kb

input:

1000 5445
899 357 591032
602 79 628216
579 137 178288
74 586 238235
818 874 242694
278 178 56824
518 662 167740
858 654 385465
847 679 643915
681 526 254534
191 384 63953
514 613 665029
607 15 872520
192 316 441138
719 672 963655
470 473 182990
595 856 350626
316 589 343787
869 37 624276
297 90 9490...

output:

NIE

result:

ok single line: 'NIE'

Test #50:

score: 0
Accepted
time: 2ms
memory: 8092kb

input:

1000 4469
132 918 845137
492 709 716972
699 45 161791
515 240 857301
590 482 65510
853 972 603813
368 244 178255
420 686 891436
782 14 153251
311 966 985853
985 336 497834
146 672 41192
949 273 922108
924 60 688741
994 299 347131
897 761 765573
405 753 54290
573 418 677311
92 828 607487
103 764 9228...

output:

NIE

result:

ok single line: 'NIE'

Test #51:

score: 0
Accepted
time: 3ms
memory: 7924kb

input:

1000 5283
134 664 144989
964 519 720997
758 295 598382
312 68 455952
929 794 962068
510 389 926296
778 245 846454
983 299 135471
429 55 421136
255 871 445303
427 371 208101
649 898 412738
226 890 823929
382 456 453849
565 296 834179
811 143 784152
451 378 766885
245 631 214961
633 659 337796
683 947...

output:

NIE

result:

ok single line: 'NIE'

Test #52:

score: 0
Accepted
time: 0ms
memory: 8268kb

input:

1000 9574
812 835 815334
107 602 757638
570 496 845894
254 188 598956
531 985 667222
18 978 337099
503 10 855731
526 466 853410
357 938 136462
203 156 600890
484 564 77656
267 285 473890
297 366 576468
425 5 284471
975 773 758505
535 494 888327
893 897 761761
191 318 368814
923 433 208871
651 685 53...

output:

NIE

result:

ok single line: 'NIE'

Test #53:

score: 0
Accepted
time: 6ms
memory: 7976kb

input:

1000 9009
838 730 968241
354 552 343830
328 138 517709
290 211 567403
816 939 93514
967 632 306940
444 660 512251
288 858 954724
154 958 522651
186 441 643462
225 719 458883
664 104 809771
245 711 362852
104 763 709834
778 600 187891
1000 806 822798
331 449 982713
614 67 801013
185 681 413482
603 77...

output:

NIE

result:

ok single line: 'NIE'

Test #54:

score: 0
Accepted
time: 2ms
memory: 7816kb

input:

1000 2742
799 187 511524
793 369 108596
353 952 341739
362 484 621417
757 5 170396
960 735 643749
448 551 852714
403 98 324668
136 658 793628
85 690 874147
402 714 424426
964 56 253031
808 849 344431
217 891 824983
534 370 480253
929 571 416300
342 765 962889
253 327 573466
254 376 340589
636 860 47...

output:

NIE

result:

ok single line: 'NIE'

Test #55:

score: 0
Accepted
time: 0ms
memory: 7792kb

input:

1000 2524
55 413 271809
897 469 417503
338 337 102725
729 365 886328
528 950 568126
938 215 323254
726 976 364896
887 40 357918
451 72 197047
574 875 738100
312 453 505831
740 845 913460
958 394 508818
887 111 11489
834 502 966819
962 564 106137
707 160 296421
242 881 457345
106 967 690849
407 293 6...

output:

NIE

result:

ok single line: 'NIE'

Test #56:

score: 0
Accepted
time: 3ms
memory: 7920kb

input:

1000 7068
940 105 919615
599 130 715539
752 12 157991
638 429 310389
375 996 855240
873 128 899070
218 530 583936
910 215 109952
475 385 284
982 348 572996
802 410 711151
6 593 160119
387 347 82578
320 860 691338
341 2 303996
167 993 553351
3 868 308532
447 481 76928
208 552 667743
516 711 436891
40...

output:

NIE

result:

ok single line: 'NIE'

Test #57:

score: 0
Accepted
time: 2ms
memory: 8108kb

input:

1000 4937
93 120 166905
352 627 464021
403 880 120546
440 105 648919
332 601 35062
638 498 769031
955 676 575495
63 212 640488
964 388 605693
903 29 919633
539 402 478959
842 366 505298
186 954 644220
954 753 649310
400 475 416180
370 490 100241
391 192 484780
87 931 791402
220 4 522141
40 28 52717
...

output:

NIE

result:

ok single line: 'NIE'

Test #58:

score: 0
Accepted
time: 2ms
memory: 7812kb

input:

1000 2843
635 984 441049
662 967 539182
151 809 967961
652 191 74288
770 801 32333
323 905 738332
187 640 860542
245 873 115130
792 165 463257
505 366 978139
282 912 191213
471 710 923273
738 368 642045
72 552 745540
957 109 271050
605 478 449729
148 675 643359
207 74 465885
141 159 731815
288 122 3...

output:

NIE

result:

ok single line: 'NIE'

Test #59:

score: 0
Accepted
time: 3ms
memory: 8160kb

input:

1000 6158
630 78 264537
681 549 101158
502 508 213956
127 408 439057
685 283 879827
748 484 505017
993 704 377215
113 435 699337
940 781 221175
880 463 89072
208 463 660910
12 578 120262
290 947 108441
344 383 181829
566 224 226799
526 395 261183
37 5 793090
795 672 377143
191 111 596051
733 406 657...

output:

NIE

result:

ok single line: 'NIE'

Test #60:

score: 0
Accepted
time: 0ms
memory: 7720kb

input:

1000 2997
25 779 630879
790 58 902698
754 289 856794
29 87 204079
252 353 574819
158 740 684459
6 162 714295
394 381 515561
370 841 685249
576 320 505133
730 603 100876
477 874 906722
922 18 545733
271 264 867907
425 867 990646
881 791 572670
22 356 52655
804 326 807064
509 761 782603
935 979 607715...

output:

NIE

result:

ok single line: 'NIE'

Test #61:

score: 0
Accepted
time: 2ms
memory: 7804kb

input:

1000 3226
383 622 70419
930 496 39323
529 878 992219
313 374 101035
631 212 518567
611 749 994500
502 32 672690
95 984 415832
44 983 660270
970 434 669758
539 309 846556
890 781 926816
488 803 675780
944 683 35241
680 324 274488
305 807 736245
897 649 123357
347 756 222370
647 739 781130
533 564 709...

output:

NIE

result:

ok single line: 'NIE'

Test #62:

score: 0
Accepted
time: 2ms
memory: 8072kb

input:

1000 2868
263 519 342869
634 870 893528
638 222 280643
245 352 106056
10 130 149841
434 659 227875
6 131 632261
161 629 829700
612 177 183062
166 25 689494
215 747 343790
937 750 332188
147 512 17010
702 519 220258
552 782 8184
299 281 249075
210 483 247051
736 531 146383
697 130 489447
709 814 9536...

output:

NIE

result:

ok single line: 'NIE'

Test #63:

score: 0
Accepted
time: 8ms
memory: 7884kb

input:

500 6163
114 213 995450
87 317 483117
455 244 839824
396 288 642838
223 147 84668
377 443 942051
433 115 150391
195 190 428748
177 299 356659
283 347 316769
465 19 860811
259 113 563494
54 162 456010
389 233 886962
106 213 102672
270 467 705959
296 254 841817
441 30 551957
301 144 428811
449 389 185...

output:

1408077

result:

ok single line: '1408077'

Test #64:

score: 0
Accepted
time: 0ms
memory: 7820kb

input:

500 5227
124 86 31702
336 384 893646
221 228 414661
456 387 630316
340 143 705810
73 307 884271
404 470 548187
498 133 248372
131 205 736143
484 112 759851
373 60 449756
438 156 822747
330 175 653403
453 391 445069
18 331 821700
98 260 813049
32 194 812144
79 205 302397
252 456 788911
140 294 622088...

output:

NIE

result:

ok single line: 'NIE'

Test #65:

score: 0
Accepted
time: 2ms
memory: 7964kb

input:

500 8253
174 391 412382
457 287 758596
424 407 15434
153 61 873341
162 429 885420
429 423 653638
173 396 368519
134 96 694673
320 84 90283
119 423 567661
489 209 135043
29 255 483855
379 306 308530
254 3 54742
318 109 276917
493 446 294106
463 3 21163
114 206 489167
392 401 883202
391 110 795594
493...

output:

NIE

result:

ok single line: 'NIE'

Test #66:

score: 0
Accepted
time: 3ms
memory: 7844kb

input:

500 5159
117 279 557295
417 63 452879
449 123 248389
343 234 745653
8 480 748051
49 493 388312
112 98 658395
62 77 839767
449 468 645371
106 150 621274
293 391 165305
292 433 739461
340 79 987756
104 165 547806
276 22 888075
236 448 202803
439 461 282915
266 346 337640
145 393 348025
110 146 464986
...

output:

3694300

result:

ok single line: '3694300'

Test #67:

score: 0
Accepted
time: 3ms
memory: 7892kb

input:

500 7126
94 449 362688
103 142 684245
324 497 417453
358 377 646089
273 62 905506
107 195 733519
123 381 988910
308 130 104775
415 337 740596
319 390 995465
482 251 401451
425 296 338443
318 247 787494
213 43 157649
70 10 12908
305 116 223654
66 100 475117
32 298 998649
164 281 921494
246 201 425931...

output:

NIE

result:

ok single line: 'NIE'

Test #68:

score: 0
Accepted
time: 3ms
memory: 7868kb

input:

500 5670
269 243 309583
72 295 401792
84 35 312582
374 416 336684
63 446 340317
341 463 994600
261 276 141433
335 313 279715
373 77 232698
121 229 111907
309 339 927753
473 200 248451
13 41 808403
357 182 560004
398 319 963431
84 228 247322
467 324 896412
54 286 15369
291 62 267947
342 398 463583
20...

output:

NIE

result:

ok single line: 'NIE'

Test #69:

score: 0
Accepted
time: 0ms
memory: 7860kb

input:

500 5120
404 459 149477
188 483 672612
342 295 158427
363 395 425250
415 337 916586
261 347 321223
7 87 976119
75 413 634855
169 267 704331
78 128 796430
431 10 240095
493 254 566600
51 311 486031
175 86 757784
86 113 68600
133 313 240725
212 91 79453
136 125 670387
382 228 158870
139 83 950903
253 ...

output:

2125880

result:

ok single line: '2125880'

Test #70:

score: 0
Accepted
time: 0ms
memory: 7940kb

input:

500 8232
251 64 173996
485 220 146415
198 461 349155
150 382 737860
33 95 195921
250 259 946157
385 472 852683
99 164 395096
275 97 734123
385 364 167194
368 31 116472
103 201 824134
53 67 950914
424 260 555108
370 414 41326
325 174 866577
319 298 621216
62 95 780830
347 335 384941
303 357 293282
18...

output:

NIE

result:

ok single line: 'NIE'

Test #71:

score: 0
Accepted
time: 0ms
memory: 7900kb

input:

500 9062
110 424 642582
237 33 198303
73 2 715931
229 468 974110
399 268 532977
374 133 25921
326 378 187910
178 467 121332
390 256 40522
467 391 924112
87 38 686830
294 40 758865
471 170 7015
264 251 284911
381 487 868262
26 423 748184
379 121 797663
445 499 4117
188 381 148903
202 113 183650
441 1...

output:

1802578

result:

ok single line: '1802578'

Test #72:

score: 0
Accepted
time: 4ms
memory: 8204kb

input:

500 7758
402 482 760567
152 286 692195
303 291 533895
371 290 663509
130 291 634408
335 232 350849
187 388 118067
442 455 419505
80 242 3579
384 57 254097
427 29 330309
343 464 116765
280 115 284173
245 140 507834
427 230 465290
66 38 891951
406 59 187327
355 56 348404
478 32 180036
376 279 766450
2...

output:

NIE

result:

ok single line: 'NIE'

Test #73:

score: 0
Accepted
time: 13ms
memory: 8000kb

input:

500 8332
390 343 683955
28 283 115839
366 423 210904
372 470 630352
174 288 667403
92 301 498602
182 133 339162
193 133 643887
49 111 109105
56 478 394254
452 29 248665
448 401 507307
297 336 492493
188 109 143285
341 336 994203
126 77 92899
145 194 986239
466 46 942901
385 264 142836
102 133 265718...

output:

920612

result:

ok single line: '920612'

Test #74:

score: 0
Accepted
time: 0ms
memory: 7992kb

input:

500 7934
42 39 183204
357 143 66838
319 500 482739
219 120 206364
324 331 263980
383 88 475631
471 238 763155
102 413 403256
302 299 96706
414 285 249395
44 260 515314
47 391 365628
414 416 295097
249 10 794473
205 115 108419
99 257 89618
280 146 992964
73 426 513651
499 191 332034
299 257 761876
34...

output:

1561558

result:

ok single line: '1561558'

Test #75:

score: 0
Accepted
time: 16ms
memory: 8024kb

input:

500 8983
209 467 386068
16 193 99593
302 1 297053
210 325 891303
341 429 277286
41 37 345366
478 297 607257
364 179 658957
224 287 842370
32 189 755674
480 176 55903
460 200 469381
497 72 143143
182 219 242473
450 32 746134
492 487 791374
397 228 300737
314 323 932165
129 410 377086
402 251 403192
4...

output:

844510

result:

ok single line: '844510'

Test #76:

score: 0
Accepted
time: 3ms
memory: 8244kb

input:

500 9190
286 277 904147
165 139 295786
296 255 262658
470 134 897640
298 144 552275
364 35 317763
312 58 750497
186 231 565954
60 129 48763
174 480 325440
105 315 958079
146 231 990911
367 13 616303
305 123 61524
470 369 32304
241 314 743569
78 329 370612
368 142 35302
495 304 318203
300 448 850343
...

output:

968512

result:

ok single line: '968512'

Test #77:

score: 0
Accepted
time: 5ms
memory: 7912kb

input:

500 7907
40 469 215803
377 8 428479
35 235 699591
441 261 226444
119 264 7699
475 322 291123
421 336 90498
113 375 196512
414 211 358518
274 74 529579
98 457 516583
250 358 995873
283 155 704045
158 271 727977
447 62 49831
306 159 913557
465 322 636485
101 400 93015
439 223 820077
422 270 534662
473...

output:

NIE

result:

ok single line: 'NIE'

Test #78:

score: 0
Accepted
time: 2ms
memory: 7788kb

input:

1000 628
232 296 965782
99 629 463706
741 713 472593
252 842 649741
41 268 838163
695 7 287878
529 559 346859
265 647 783784
471 89 193649
946 731 491193
492 960 709075
694 887 66098
707 615 321897
456 989 787318
641 325 994317
78 605 414019
258 699 940301
254 365 529566
1000 421 912531
792 791 9639...

output:

NIE

result:

ok single line: 'NIE'

Test #79:

score: 0
Accepted
time: 0ms
memory: 7976kb

input:

1000 9728
8 377 684176
553 688 988055
144 233 76804
790 207 21480
177 693 843217
22 815 75684
283 166 702749
883 856 575628
759 563 386551
183 394 669350
219 260 59926
446 881 764313
920 467 267611
241 618 638161
786 847 683793
470 907 456669
163 501 388429
857 383 479003
485 953 112201
923 205 7172...

output:

NIE

result:

ok single line: 'NIE'

Test #80:

score: 0
Accepted
time: 2ms
memory: 7788kb

input:

1000 1812
742 299 942645
15 985 106272
292 780 208155
237 861 881398
688 650 314882
506 125 926010
945 854 407165
934 822 401399
10 224 271995
977 120 539918
343 766 678435
17 589 234100
180 869 374177
195 982 97135
709 844 731906
342 949 260492
143 992 432624
851 472 757035
133 158 485260
128 776 2...

output:

NIE

result:

ok single line: 'NIE'

Test #81:

score: 0
Accepted
time: 3ms
memory: 7820kb

input:

1000 3788
544 580 247174
289 263 154106
69 943 183115
320 50 297724
328 373 820360
455 737 396229
407 464 636555
773 257 196736
729 849 330752
259 301 210044
568 385 395446
35 423 798941
28 739 242743
406 388 100448
650 228 78302
269 643 889618
86 49 177562
149 831 844831
66 72 798288
168 108 658393...

output:

NIE

result:

ok single line: 'NIE'

Test #82:

score: 0
Accepted
time: 0ms
memory: 8060kb

input:

1000 9957
768 212 135641
91 295 608150
412 220 661735
902 135 433294
270 108 87847
723 760 358611
319 903 307164
463 63 932111
104 207 395054
281 348 710991
704 247 688338
899 477 711206
9 477 895600
396 861 467830
444 39 995792
105 139 86396
648 480 912292
928 892 467900
251 485 949371
190 465 8436...

output:

NIE

result:

ok single line: 'NIE'

Test #83:

score: 0
Accepted
time: 5ms
memory: 8004kb

input:

1000 9124
45 864 43715
956 512 468551
27 325 30144
518 786 504453
31 1 60172
400 303 995724
834 967 187028
781 945 840192
762 463 468232
465 33 309024
878 929 461986
310 636 454001
963 34 332352
870 732 525875
811 859 303663
127 897 358774
817 40 873466
202 167 723974
955 123 547590
424 416 954297
2...

output:

NIE

result:

ok single line: 'NIE'

Test #84:

score: 0
Accepted
time: 2ms
memory: 7804kb

input:

1000 3623
378 579 90382
884 323 453190
562 204 19493
300 160 994070
419 148 822798
626 817 874802
258 130 719445
303 972 748323
352 407 174252
969 604 628360
638 418 546618
508 704 509571
149 740 449497
925 491 634596
788 132 333199
671 903 280978
788 943 81292
238 484 588041
308 337 888379
647 978 ...

output:

NIE

result:

ok single line: 'NIE'

Test #85:

score: 0
Accepted
time: 0ms
memory: 7992kb

input:

1000 9994
782 788 797295
29 330 572292
617 685 77508
765 175 237188
934 36 642155
68 697 570
55 733 42081
300 170 862999
676 504 811267
781 652 390939
643 814 504531
734 315 772240
705 677 527249
434 279 544249
616 1000 156272
50 404 322291
410 283 693774
960 913 397175
472 802 520914
759 511 244093...

output:

NIE

result:

ok single line: 'NIE'

Test #86:

score: 0
Accepted
time: 3ms
memory: 8248kb

input:

1000 9241
926 110 364274
610 172 590066
522 745 567801
178 532 770479
262 245 435792
64 217 421441
759 543 106623
634 188 740979
767 59 830455
626 331 886520
275 1000 334602
945 484 740851
252 287 824738
750 279 290396
216 449 604436
219 703 485933
901 397 207685
328 855 568344
291 437 165485
675 54...

output:

NIE

result:

ok single line: 'NIE'

Test #87:

score: 0
Accepted
time: 2ms
memory: 7652kb

input:

1000 1731
460 363 378478
3 459 994598
504 329 367767
279 216 193718
19 987 41420
611 260 50396
345 485 342404
217 748 333623
148 375 558505
465 407 246278
988 39 398785
169 87 361795
724 384 338779
313 125 267762
183 356 44529
308 216 801802
960 664 541976
453 107 866471
872 802 548583
869 106 65529...

output:

NIE

result:

ok single line: 'NIE'

Test #88:

score: 0
Accepted
time: 0ms
memory: 7748kb

input:

1000 2610
259 493 80127
131 262 39618
353 954 515340
343 521 239061
549 142 551178
677 892 308422
987 524 782952
19 194 787867
477 753 260184
685 319 442483
168 706 750407
157 144 38864
102 178 26625
670 556 530829
886 78 779646
943 75 363303
11 220 132603
946 981 582640
399 315 302217
860 198 86744...

output:

NIE

result:

ok single line: 'NIE'

Test #89:

score: 0
Accepted
time: 3ms
memory: 7940kb

input:

1000 8588
454 326 93817
75 665 976308
412 49 828016
812 879 449169
384 890 570433
216 754 387995
128 69 950733
808 286 323463
572 414 307499
1000 275 875021
918 868 11191
831 423 536062
792 81 66189
7 880 735217
942 212 653494
116 538 484269
659 610 737314
236 560 639688
192 609 67528
273 422 448914...

output:

NIE

result:

ok single line: 'NIE'

Test #90:

score: 0
Accepted
time: 0ms
memory: 7828kb

input:

1000 3747
928 915 947002
86 284 756985
347 816 757967
627 744 568254
431 199 504790
820 118 805177
334 970 701844
196 81 527804
247 716 507290
557 235 64862
485 918 89241
748 559 626892
763 749 370708
273 165 267807
819 597 624162
148 600 425586
156 100 566736
129 707 475183
508 984 193861
785 226 1...

output:

6379454

result:

ok single line: '6379454'

Test #91:

score: 0
Accepted
time: 8ms
memory: 8116kb

input:

1000 5318
828 979 991441
827 638 934222
758 641 211351
854 177 845655
888 158 480311
78 148 877792
439 609 274646
442 887 593415
856 106 759521
940 171 550775
779 1 204956
717 711 541158
446 440 509957
510 935 853923
212 268 121805
750 359 750066
326 707 416335
199 652 697913
518 822 263995
550 852 ...

output:

NIE

result:

ok single line: 'NIE'

Test #92:

score: 0
Accepted
time: 9ms
memory: 7928kb

input:

1000 7704
268 255 371851
449 662 821585
969 485 283238
800 179 998877
28 684 155968
749 803 965556
127 267 819997
579 979 762059
565 811 595851
680 820 197327
498 196 256484
497 168 236216
933 87 721337
1 107 970995
333 870 54505
418 178 383348
1 995 26211
571 580 78960
582 572 338906
204 435 539350...

output:

NIE

result:

ok single line: 'NIE'

Test #93:

score: 0
Accepted
time: 3ms
memory: 7936kb

input:

1000 5619
240 320 485037
603 457 445333
381 99 967391
516 533 872092
125 562 334378
215 374 429704
288 59 783395
630 6 590477
679 681 95873
339 714 949110
490 705 96329
315 937 542697
245 804 311832
904 816 293989
702 145 662580
772 203 760796
862 903 816505
60 290 638898
16 357 518191
924 103 71816...

output:

NIE

result:

ok single line: 'NIE'

Test #94:

score: 0
Accepted
time: 3ms
memory: 7960kb

input:

1000 6557
545 489 987870
886 467 758727
306 986 699078
545 140 422380
974 90 803446
868 863 448766
357 345 253696
833 899 826122
811 577 876684
680 883 949912
450 711 587143
258 102 790695
375 362 201862
355 303 168582
608 469 165580
667 661 514464
563 789 549437
683 414 139395
952 677 652688
904 52...

output:

NIE

result:

ok single line: 'NIE'

Test #95:

score: 0
Accepted
time: 0ms
memory: 8160kb

input:

1000 6311
118 971 147791
217 408 875850
479 717 459438
954 882 487377
862 87 726639
615 717 159872
968 210 477090
463 422 485817
404 459 356246
885 179 405846
501 461 779776
491 864 934137
228 887 180484
439 305 228084
576 332 475630
752 905 358449
764 360 237385
816 197 935075
842 590 46330
601 70 ...

output:

NIE

result:

ok single line: 'NIE'

Test #96:

score: 0
Accepted
time: 2ms
memory: 7952kb

input:

1000 5983
639 33 720193
581 789 885002
849 233 589284
1 591 530597
281 184 270369
776 902 750717
785 895 39681
826 620 639777
301 625 350147
952 187 56627
210 730 187452
447 962 571390
810 404 181211
2 389 830674
707 338 901669
84 746 43681
88 540 114829
412 622 232256
427 97 503337
887 173 192209
4...

output:

NIE

result:

ok single line: 'NIE'

Test #97:

score: 0
Accepted
time: 0ms
memory: 7936kb

input:

1000 9882
732 410 58497
799 390 492767
513 35 108676
612 263 911625
211 254 142079
485 692 7540
592 198 291517
451 852 960558
948 96 917988
278 989 131825
794 412 726629
634 367 200149
355 91 937554
239 600 851465
610 605 744062
861 882 95688
425 349 758621
145 338 931564
777 393 993260
331 795 9941...

output:

NIE

result:

ok single line: 'NIE'

Test #98:

score: 0
Accepted
time: 7ms
memory: 7880kb

input:

1000 6658
188 640 855578
298 75 755161
560 456 960819
117 585 4966
165 646 566846
302 39 623750
917 868 796452
780 968 7727
786 305 305182
316 114 510623
76 288 182862
625 202 257571
982 1 528959
380 695 283983
631 74 528539
673 510 898429
674 165 434942
245 513 639965
76 989 274590
934 567 596053
5...

output:

NIE

result:

ok single line: 'NIE'

Test #99:

score: 0
Accepted
time: 11ms
memory: 7944kb

input:

1000 8491
10 379 924011
829 564 855734
825 798 924544
991 13 400557
838 387 536280
733 500 493975
167 703 81477
478 371 745375
861 320 505410
933 427 622267
992 601 359868
817 878 912441
16 330 380182
148 683 662309
545 916 259016
583 251 1795
712 616 661870
313 395 978955
767 389 978152
870 787 427...

output:

2940849

result:

ok single line: '2940849'

Test #100:

score: 0
Accepted
time: 9ms
memory: 7932kb

input:

1000 7439
664 745 447311
812 58 997355
192 833 100212
406 407 630584
938 517 756486
582 740 460172
854 390 132264
736 922 288215
347 394 717308
920 360 287711
6 881 715375
911 457 509440
671 818 503833
901 718 844362
730 362 286088
671 476 327132
358 157 401435
589 435 973087
478 262 955204
199 554 ...

output:

NIE

result:

ok single line: 'NIE'

Test #101:

score: 0
Accepted
time: 3ms
memory: 7948kb

input:

1000 6433
711 733 682177
406 658 713256
796 483 698967
712 714 334333
842 496 806056
545 73 646553
443 941 429876
322 231 126693
346 917 748466
975 980 157375
699 105 879282
462 195 690741
837 20 736823
251 461 270726
201 924 596351
817 392 506457
189 473 174395
238 746 89946
51 898 61188
858 46 158...

output:

NIE

result:

ok single line: 'NIE'

Test #102:

score: 0
Accepted
time: 10ms
memory: 7952kb

input:

1000 6451
567 218 784183
61 843 652380
360 494 385310
118 948 681796
967 769 466169
862 965 998486
637 512 258101
175 256 690962
113 104 91204
992 32 624265
480 533 962179
283 606 282557
33 585 687931
427 770 348913
372 575 687067
683 919 702918
891 602 188670
682 91 459812
897 678 795115
570 965 95...

output:

4219287

result:

ok single line: '4219287'

Test #103:

score: 0
Accepted
time: 5ms
memory: 7912kb

input:

1000 6979
383 653 360033
805 136 887792
236 992 4336
118 405 578721
754 782 573547
372 350 368759
915 939 244682
385 486 49718
168 176 697731
541 501 210475
115 489 824220
576 189 487957
997 873 639574
806 516 82915
701 94 817479
749 856 989934
595 21 69619
219 405 67296
864 356 693036
57 803 177464...

output:

NIE

result:

ok single line: 'NIE'

Test #104:

score: 0
Accepted
time: 15ms
memory: 8268kb

input:

1000 9407
182 189 255819
28 594 727603
293 640 666765
793 568 395348
48 12 460343
863 610 874945
870 540 2998
294 691 421513
432 205 236308
651 436 387576
23 924 846618
254 697 209424
129 867 262721
16 676 181419
560 365 266126
755 779 289105
288 958 347867
53 513 307464
720 659 355281
463 415 82135...

output:

NIE

result:

ok single line: 'NIE'

Test #105:

score: 0
Accepted
time: 6ms
memory: 7940kb

input:

1000 8073
131 147 731612
807 829 883803
24 327 987071
741 266 350706
388 301 192301
435 820 75084
372 909 561401
569 485 197976
946 699 741319
994 665 838835
170 951 641712
994 350 291528
107 884 554806
200 593 548524
687 143 813843
117 924 322051
233 459 589141
740 214 141148
169 775 673679
116 378...

output:

NIE

result:

ok single line: 'NIE'

Test #106:

score: 0
Accepted
time: 6ms
memory: 8148kb

input:

1000 6787
200 864 396329
964 384 833642
333 177 214901
754 230 653157
31 1000 658019
414 530 385114
847 707 113319
505 130 389602
595 577 876855
769 697 939176
387 627 511600
37 61 831536
418 408 525715
429 559 249443
236 761 949548
538 590 309125
513 938 539960
702 936 192404
806 307 749219
459 805...

output:

NIE

result:

ok single line: 'NIE'

Test #107:

score: 0
Accepted
time: 0ms
memory: 7908kb

input:

1000 7288
133 10 874496
886 710 538991
820 297 260882
60 672 847076
716 890 748995
386 987 86800
402 677 258621
865 138 105841
340 860 831351
339 840 356208
387 21 589519
515 370 840403
645 831 598311
822 264 530891
702 83 879110
489 259 282310
639 586 492478
692 32 266224
510 86 291795
525 153 3995...

output:

NIE

result:

ok single line: 'NIE'

Test #108:

score: 0
Accepted
time: 4ms
memory: 8000kb

input:

1000 7904
192 997 647924
521 651 292412
367 392 807611
583 540 812061
871 370 437114
7 252 322445
819 695 134125
939 227 461233
329 434 142243
539 700 237190
933 31 601903
409 336 466908
121 772 905335
327 653 771973
710 437 982107
331 345 187765
480 701 601158
600 750 548968
491 394 221336
937 381 ...

output:

3315829

result:

ok single line: '3315829'

Test #109:

score: 0
Accepted
time: 0ms
memory: 7848kb

input:

1000 5056
306 620 150918
518 560 238930
745 833 628626
112 122 374340
28 880 410902
718 334 386849
167 510 462089
611 268 224873
399 38 885511
739 312 926596
930 452 255784
138 962 261441
190 262 512472
807 304 200079
961 742 80261
531 423 777172
14 257 872908
698 710 576358
107 391 68934
126 444 36...

output:

NIE

result:

ok single line: 'NIE'

Test #110:

score: 0
Accepted
time: 0ms
memory: 8136kb

input:

1000 5804
957 256 460481
80 143 852988
115 579 182352
368 279 162603
79 665 660946
5 503 484624
818 831 909847
168 277 801415
810 984 245038
494 886 625239
516 18 196961
113 901 607342
2 528 493349
2 775 252563
842 180 591160
172 47 467305
312 477 940690
158 573 12152
929 759 762420
140 492 176845
6...

output:

NIE

result:

ok single line: 'NIE'

Test #111:

score: 0
Accepted
time: 0ms
memory: 7940kb

input:

1000 5786
139 467 90325
840 547 493170
791 838 145242
979 503 953308
903 929 274485
982 619 466098
826 597 499943
943 761 814588
724 228 805370
823 163 422127
214 694 679167
517 143 922914
991 109 546455
647 217 228817
168 324 921228
228 352 655808
555 109 803728
102 225 682957
592 539 45243
743 50 ...

output:

NIE

result:

ok single line: 'NIE'

Test #112:

score: 0
Accepted
time: 2ms
memory: 7824kb

input:

1000 3643
178 722 877859
801 66 724358
641 935 379052
305 427 10918
346 631 299567
612 269 288351
755 793 164572
787 7 676987
372 265 248223
74 87 34823
730 917 382928
408 294 334185
49 976 747565
842 283 625017
56 556 664059
168 232 371855
545 613 618121
32 151 799033
445 484 65085
167 45 509243
17...

output:

NIE

result:

ok single line: 'NIE'

Test #113:

score: 0
Accepted
time: 0ms
memory: 7836kb

input:

1000 8571
702 237 984493
267 87 920684
145 319 781303
503 731 113219
1 267 370161
152 415 802703
970 84 882769
623 426 170034
841 661 249360
634 792 506775
485 117 332860
777 539 92977
788 105 557371
143 120 338602
666 604 322193
591 253 935687
865 785 740016
740 739 130372
871 612 54177
930 917 905...

output:

NIE

result:

ok single line: 'NIE'

Test #114:

score: 0
Accepted
time: 0ms
memory: 7948kb

input:

1000 6167
410 310 983970
258 174 139850
365 261 720178
791 221 384076
793 275 648854
486 401 209099
623 677 951003
964 870 604438
367 666 479232
797 194 380999
409 824 820315
97 414 668225
773 787 638855
660 108 888668
185 220 529592
355 208 466149
332 170 861605
687 816 883899
101 792 278096
163 55...

output:

NIE

result:

ok single line: 'NIE'

Test #115:

score: 0
Accepted
time: 3ms
memory: 8000kb

input:

1000 7871
851 504 877837
729 900 327314
462 802 192433
727 209 667314
855 416 321285
207 937 284913
496 718 583766
966 804 198178
159 475 223941
357 348 196431
695 66 811051
780 686 632966
91 164 892785
117 90 258670
159 244 757103
546 505 36442
393 5 588216
743 97 672167
330 826 57690
970 571 73797...

output:

NIE

result:

ok single line: 'NIE'

Test #116:

score: 0
Accepted
time: 0ms
memory: 7944kb

input:

1000 5580
349 2 105602
692 124 400503
835 629 607095
275 4 186054
427 872 395953
394 486 354513
957 749 40827
235 678 815829
145 197 328431
903 220 799115
968 421 684908
572 120 73004
679 940 1171
918 581 360763
884 927 75731
240 514 788744
559 656 582649
499 811 171064
756 830 175205
788 291 459217...

output:

NIE

result:

ok single line: 'NIE'

Test #117:

score: 0
Accepted
time: 2ms
memory: 7760kb

input:

1000 1782
425 871 250283
654 63 811225
641 88 824878
354 352 516039
500 164 834121
611 402 489065
542 405 83752
65 747 871788
521 148 87893
760 457 88335
248 683 663615
675 37 471946
28 57 23425
946 71 962246
405 1000 187767
179 612 628775
919 501 935342
34 147 408980
120 193 624286
732 587 234836
7...

output:

NIE

result:

ok single line: 'NIE'

Test #118:

score: 0
Accepted
time: 0ms
memory: 8192kb

input:

1000 7528
599 685 680951
971 913 246080
948 420 425713
932 460 124062
484 636 357295
116 51 941459
298 464 331210
565 20 971547
438 816 603588
74 876 121904
414 548 106285
860 641 808557
505 189 864530
580 36 944502
534 923 80497
757 664 855639
1 871 239623
991 79 167354
879 124 656642
225 836 86476...

output:

NIE

result:

ok single line: 'NIE'

Test #119:

score: 0
Accepted
time: 2ms
memory: 7804kb

input:

1000 878
772 876 391744
1 393 349556
131 268 362200
306 585 813857
104 534 108436
785 236 742225
149 425 422
553 397 287107
352 63 786547
307 886 51865
215 645 604041
501 44 591591
654 554 788918
696 657 505708
761 53 532362
827 981 605523
575 118 403250
805 645 214809
937 629 524469
86 672 297749
8...

output:

NIE

result:

ok single line: 'NIE'

Test #120:

score: 0
Accepted
time: 2ms
memory: 8108kb

input:

1000 3903
74 269 413977
792 808 548769
892 556 225666
863 423 63414
576 179 343479
366 769 539506
123 654 641872
462 810 45587
561 615 216901
75 237 174090
647 422 537332
699 752 137461
412 799 881648
910 226 748841
323 468 252805
92 411 164726
586 761 26141
469 420 572626
962 964 279690
657 633 979...

output:

NIE

result:

ok single line: 'NIE'

Test #121:

score: 0
Accepted
time: 0ms
memory: 7964kb

input:

1000 9532
414 577 451561
722 950 485944
922 737 299580
85 298 646364
152 771 358415
280 421 280905
462 934 845395
31 666 952857
50 543 936913
421 161 55835
568 870 997850
706 21 996439
373 923 208055
458 850 21513
616 72 575706
36 750 364887
144 467 902497
515 590 906973
900 288 87983
942 756 838903...

output:

NIE

result:

ok single line: 'NIE'

Test #122:

score: 0
Accepted
time: 3ms
memory: 7868kb

input:

1000 5850
172 476 33370
977 493 219283
4 452 527578
623 427 462713
198 473 945260
323 713 460050
866 317 3037
883 676 57388
295 185 371264
605 851 147331
303 554 189067
344 542 324971
10 470 565379
545 736 859894
748 287 367814
319 488 371035
826 400 632363
409 863 731702
428 307 851071
851 924 7496...

output:

NIE

result:

ok single line: 'NIE'

Test #123:

score: 0
Accepted
time: 4ms
memory: 7964kb

input:

1000 9027
873 584 982485
696 903 992624
504 645 548162
632 222 37651
106 360 626442
450 713 670769
964 855 116698
26 922 138165
178 734 469609
832 999 473682
974 877 999544
765 877 896710
203 257 606172
314 757 830173
406 965 34448
782 653 422060
583 9 353553
609 302 629455
837 680 236365
887 746 81...

output:

NIE

result:

ok single line: 'NIE'

Test #124:

score: 0
Accepted
time: 0ms
memory: 8160kb

input:

1000 8018
956 622 126270
402 18 313670
961 988 728200
992 554 919127
909 711 31925
171 118 566654
826 396 549488
975 355 665904
835 350 763875
944 206 965462
735 790 822703
992 897 318962
578 203 726858
220 706 589649
912 210 657182
220 136 249945
584 226 951007
203 799 125794
199 51 38502
999 99 25...

output:

NIE

result:

ok single line: 'NIE'

Test #125:

score: 0
Accepted
time: 0ms
memory: 7944kb

input:

1000 8403
529 404 103615
893 584 711873
113 621 770112
558 49 968749
853 29 472001
549 965 351011
293 828 988989
428 82 774391
536 178 117464
799 141 171276
49 174 390697
498 922 865415
30 908 5337
121 234 105044
619 204 881172
503 165 592840
496 743 80305
428 630 211519
700 383 614938
537 561 40902...

output:

NIE

result:

ok single line: 'NIE'

Test #126:

score: 0
Accepted
time: 3ms
memory: 8020kb

input:

1000 8907
163 137 878946
949 349 594671
48 820 462292
900 646 727719
931 667 288377
226 401 76973
716 783 325374
119 199 778481
782 1 972138
491 174 548978
480 933 143356
707 63 71700
456 508 92340
299 220 147588
907 854 799627
629 82 462950
328 687 899188
892 696 3589
200 14 316961
244 334 262299
1...

output:

NIE

result:

ok single line: 'NIE'

Test #127:

score: 0
Accepted
time: 4ms
memory: 8204kb

input:

1000 7877
209 356 993831
296 342 993192
600 790 551344
724 189 374364
562 267 939158
693 860 404211
196 353 876786
842 590 640136
516 802 510800
94 646 789151
152 978 437037
538 71 545285
500 993 788951
718 14 483988
311 599 128917
950 628 474420
230 191 74682
516 63 567778
601 300 501243
979 284 85...

output:

NIE

result:

ok single line: 'NIE'

Test #128:

score: 0
Accepted
time: 3ms
memory: 7908kb

input:

1000 7307
75 128 504010
267 671 533332
695 909 96341
535 799 885996
459 458 868710
961 953 738941
937 275 501438
646 119 602282
67 876 648684
368 901 601199
80 771 264410
380 313 192192
818 977 384816
52 829 949471
10 743 545470
528 343 861445
50 108 946964
152 824 346804
580 377 5747
73 500 390067
...

output:

NIE

result:

ok single line: 'NIE'

Test #129:

score: 0
Accepted
time: 0ms
memory: 7980kb

input:

1000 9736
276 573 656302
591 928 228654
565 213 783017
19 470 864427
847 969 893149
490 46 337039
142 147 577064
825 961 537651
589 409 667239
393 722 654294
574 495 453171
843 310 172111
11 379 825210
683 979 509165
566 925 271092
529 960 182991
596 885 589539
488 789 527074
188 372 609844
183 932 ...

output:

NIE

result:

ok single line: 'NIE'

Test #130:

score: 0
Accepted
time: 2ms
memory: 7952kb

input:

1000 6343
816 229 590804
505 780 843040
997 195 393276
270 923 353385
263 472 443841
63 65 383608
553 920 598318
973 594 9214
805 388 530574
535 646 592508
675 175 210853
502 938 95938
10 679 945482
865 720 458139
814 57 661368
466 98 425219
809 671 889478
645 761 52874
884 605 739879
635 660 507926...

output:

NIE

result:

ok single line: 'NIE'

Test #131:

score: 0
Accepted
time: 1ms
memory: 8008kb

input:

1000 682
778 5 248699
853 958 341786
746 787 885979
713 644 896692
275 880 320992
322 834 925020
430 950 671946
506 221 161652
515 381 328474
728 345 596269
736 697 354599
598 484 401199
389 697 567874
942 289 265403
605 389 726752
763 379 903905
983 195 302976
756 764 235533
171 332 629683
298 662 ...

output:

NIE

result:

ok single line: 'NIE'

Test #132:

score: 0
Accepted
time: 4ms
memory: 7772kb

input:

1000 4640
50 678 981851
885 764 117292
748 500 87056
808 585 805526
970 900 788225
919 671 241335
166 61 187556
407 573 679312
2 925 726692
287 27 279580
297 703 108439
908 132 211270
579 374 221663
364 777 895246
503 786 485471
617 777 872385
110 328 542563
958 949 979036
703 725 485532
416 82 8212...

output:

NIE

result:

ok single line: 'NIE'

Test #133:

score: 0
Accepted
time: 0ms
memory: 8256kb

input:

1000 8983
942 193 487803
354 908 548433
878 299 146391
903 794 458499
994 360 676838
168 405 529865
674 859 110860
999 818 526211
285 578 400127
834 908 94102
548 621 670621
405 769 729907
218 309 735922
152 199 671081
451 717 591747
247 429 52017
204 15 249630
169 967 693435
115 48 829737
150 507 1...

output:

NIE

result:

ok single line: 'NIE'

Test #134:

score: 0
Accepted
time: 0ms
memory: 7728kb

input:

1000 55
441 686 372136
934 441 693121
161 867 576687
824 790 564540
528 959 963242
540 520 474157
257 9 635045
739 66 970022
470 785 950068
856 600 191413
959 911 82933
150 839 789206
455 406 339217
455 834 38835
243 345 668274
523 905 856966
761 732 573052
499 955 647002
469 629 334340
480 848 4130...

output:

NIE

result:

ok single line: 'NIE'

Test #135:

score: 0
Accepted
time: 2ms
memory: 7800kb

input:

1000 3270
580 572 323471
664 956 235250
612 286 890485
615 726 983766
5 954 249652
327 574 157886
402 740 308658
524 783 131738
769 611 635745
153 874 929210
509 203 296571
599 564 731895
848 563 781986
738 439 577075
733 614 683812
317 343 72869
21 872 565577
538 328 553147
685 301 424697
97 119 87...

output:

NIE

result:

ok single line: 'NIE'

Test #136:

score: 0
Accepted
time: 0ms
memory: 7836kb

input:

1000 4848
884 513 128056
834 416 519675
112 549 877489
558 394 586326
382 598 609841
124 721 965419
775 802 421901
411 859 269457
470 663 594350
993 46 303510
285 103 254848
839 582 655925
615 343 930796
590 172 880027
922 421 152975
750 816 959531
273 502 340713
513 136 329550
691 504 302527
355 78...

output:

NIE

result:

ok single line: 'NIE'

Test #137:

score: 0
Accepted
time: 0ms
memory: 7952kb

input:

1000 8758
623 905 751832
919 943 687634
154 682 322075
783 569 262388
555 275 154148
784 137 793029
962 627 275906
133 522 713421
181 60 127621
608 535 603785
929 355 962572
295 724 871253
769 601 744609
634 384 968276
30 787 51841
485 895 330122
52 185 541286
829 898 862893
744 431 13807
412 330 85...

output:

NIE

result:

ok single line: 'NIE'

Test #138:

score: 0
Accepted
time: 3ms
memory: 7884kb

input:

1000 5668
510 63 546510
352 505 602084
188 682 383366
671 869 566339
435 865 41734
293 855 305541
57 291 733867
991 870 640548
146 844 859357
492 976 370515
831 364 993859
942 325 393514
153 60 527298
950 351 489464
123 673 119409
178 635 339491
623 565 128915
226 143 868445
534 409 979537
768 925 8...

output:

NIE

result:

ok single line: 'NIE'

Test #139:

score: 0
Accepted
time: 3ms
memory: 7940kb

input:

1000 8012
199 713 129072
179 242 754534
241 144 40429
551 67 532718
976 215 163712
406 492 317990
459 990 422846
53 795 169534
507 822 852137
890 769 442200
447 638 44939
623 566 982047
279 910 734601
590 695 911803
883 910 825946
160 917 337878
475 951 23178
398 669 226444
675 837 556070
133 780 62...

output:

NIE

result:

ok single line: 'NIE'

Test #140:

score: 0
Accepted
time: 4ms
memory: 8272kb

input:

1000 9882
433 707 858532
646 787 687438
223 724 692961
625 296 858437
526 491 197386
393 11 920402
599 288 21195
562 271 829541
126 924 262098
347 364 68296
644 578 729832
719 456 542670
724 331 62782
600 993 894552
640 260 731177
482 541 976817
754 688 495807
825 38 922698
634 974 514564
258 997 46...

output:

NIE

result:

ok single line: 'NIE'

Test #141:

score: 0
Accepted
time: 0ms
memory: 7836kb

input:

1000 4912
789 557 215058
101 597 401429
281 913 192403
301 13 2420
385 143 770985
723 931 83153
854 552 809307
875 546 263670
964 233 2272
723 473 307922
296 484 55729
745 220 893351
165 586 796937
571 975 30740
135 480 671565
591 379 414824
146 53 571505
238 395 284606
183 546 845135
369 975 569548...

output:

NIE

result:

ok single line: 'NIE'

Test #142:

score: 0
Accepted
time: 2ms
memory: 7808kb

input:

1000 3365
587 381 326326
166 25 299305
463 832 321979
542 283 988360
432 384 561589
969 228 547831
361 723 480894
383 720 289864
865 425 817695
932 649 352499
413 760 695073
505 10 257096
294 431 298977
689 92 541053
763 644 522964
833 646 37309
342 28 942571
807 452 557646
763 155 50573
343 971 846...

output:

NIE

result:

ok single line: 'NIE'

Test #143:

score: 0
Accepted
time: 0ms
memory: 7824kb

input:

1000 2941
408 283 683798
392 659 79940
820 542 654490
885 500 434099
588 819 710746
627 106 29392
932 907 26479
33 31 584400
328 253 242685
210 723 821735
808 556 446283
62 270 952213
671 680 955502
860 659 843575
390 1 495439
549 881 424332
985 373 141558
789 542 877689
488 542 337975
399 10 648015...

output:

NIE

result:

ok single line: 'NIE'

Test #144:

score: 0
Accepted
time: 0ms
memory: 8192kb

input:

1000 7385
701 118 253207
37 825 571906
566 516 605050
193 204 239132
498 93 230219
147 460 330163
87 994 985151
329 997 517723
954 259 339362
874 922 796956
410 407 598758
378 823 27896
323 577 692925
504 114 210051
713 199 391810
91 146 497682
701 718 753556
951 514 497788
963 662 728303
190 694 87...

output:

NIE

result:

ok single line: 'NIE'

Test #145:

score: 0
Accepted
time: 1ms
memory: 7996kb

input:

1000 1043
374 441 591449
594 259 889092
752 797 985847
376 441 769877
846 171 286369
351 749 248302
960 740 272878
122 239 578730
948 432 392803
730 810 524301
730 514 582679
789 814 765223
632 840 420764
17 424 956597
385 409 125211
683 485 704177
253 791 565858
535 895 908629
159 603 498978
846 27...

output:

NIE

result:

ok single line: 'NIE'

Test #146:

score: 0
Accepted
time: 2ms
memory: 7820kb

input:

1000 1525
908 8 476610
193 24 128402
932 983 561590
168 407 568805
478 403 74136
360 582 989976
295 237 444145
720 644 415288
315 296 567000
658 870 92461
538 255 506155
56 465 637953
673 387 739137
701 902 926776
390 792 179778
717 153 753158
476 698 982987
46 674 859311
476 89 990960
871 327 95452...

output:

NIE

result:

ok single line: 'NIE'

Test #147:

score: 0
Accepted
time: 14ms
memory: 7868kb

input:

1000 7083
45 375 745479
688 449 210874
761 917 556736
776 781 697792
877 762 234204
536 998 984994
92 925 475412
319 916 720264
58 600 359572
413 462 484641
613 436 99007
8 353 145846
287 360 936604
611 270 104077
172 597 350310
425 234 290139
832 25 145843
207 976 472400
229 815 698851
532 288 1474...

output:

NIE

result:

ok single line: 'NIE'

Test #148:

score: 0
Accepted
time: 2ms
memory: 8088kb

input:

1000 3462
292 442 605825
101 6 699616
592 932 504544
33 233 763808
804 404 2943
390 691 656016
523 839 182754
722 42 477083
745 466 973154
614 784 790473
764 544 941122
901 950 586762
888 949 761898
362 899 210704
49 445 367658
717 535 748007
478 414 731238
901 694 609539
935 144 245285
870 946 6273...

output:

NIE

result:

ok single line: 'NIE'

Test #149:

score: 0
Accepted
time: 2ms
memory: 7760kb

input:

1000 3734
463 587 578493
415 985 675056
938 991 747815
979 243 849571
771 126 749120
952 78 579606
267 830 60969
737 201 907147
605 214 393188
116 406 434322
547 192 623509
115 607 597573
35 863 478732
423 190 948523
518 178 822774
554 77 640192
923 338 205651
518 333 102964
266 138 215890
807 783 8...

output:

NIE

result:

ok single line: 'NIE'

Test #150:

score: 0
Accepted
time: 1ms
memory: 7988kb

input:

1000 158
504 181 546930
847 766 102938
611 198 869736
117 163 706300
36 10 222856
134 241 519776
657 606 851703
874 862 89953
978 898 832736
598 885 484728
231 585 174117
451 343 723655
9 448 102692
480 701 91746
107 604 680811
868 24 779213
65 860 879359
61 242 870664
127 591 408676
562 396 150381
...

output:

NIE

result:

ok single line: 'NIE'

Test #151:

score: 0
Accepted
time: 3ms
memory: 8004kb

input:

1000 8128
961 53 589756
927 924 990447
599 394 365249
332 570 388053
494 758 951178
170 925 589641
629 363 238408
354 558 404072
262 695 151634
292 358 765946
121 851 343385
281 643 492026
732 398 155461
158 636 193243
721 674 353234
881 191 145092
575 554 938999
176 324 469943
344 241 856793
129 83...

output:

NIE

result:

ok single line: 'NIE'

Test #152:

score: 0
Accepted
time: 5ms
memory: 7940kb

input:

1000 9259
104 562 90835
45 60 381363
265 128 392441
937 915 58207
734 3 378724
842 233 933224
979 532 478629
475 725 206326
814 784 457340
139 856 317596
660 350 526719
356 451 924733
987 648 157417
999 703 872039
542 522 787505
377 449 371648
336 994 11897
285 553 220179
97 781 942338
341 695 69514...

output:

3390458

result:

ok single line: '3390458'

Test #153:

score: 0
Accepted
time: 3ms
memory: 8280kb

input:

1000 10000
490 753 318328
380 159 467246
864 579 729928
581 869 578470
666 791 89872
569 854 885408
326 82 344526
439 144 250473
634 667 872553
732 991 281452
296 872 162539
881 284 262476
41 566 41204
28 543 875644
299 621 422208
951 39 468312
767 462 840396
857 764 657599
229 409 795344
490 262 72...

output:

NIE

result:

ok single line: 'NIE'

Test #154:

score: 0
Accepted
time: 7ms
memory: 7976kb

input:

1000 10000
303 533 39766
790 918 447591
216 795 570220
333 579 70138
857 773 267777
748 200 587093
676 895 610025
621 831 572766
364 96 471323
987 583 433063
89 991 436389
142 296 117470
570 237 429781
612 713 183046
248 35 562094
761 135 830273
423 473 663819
99 915 872245
265 254 813089
255 125 99...

output:

3064135

result:

ok single line: '3064135'

Test #155:

score: 0
Accepted
time: 4ms
memory: 8072kb

input:

1000 10000
835 537 692832
687 673 477300
326 867 640788
68 968 744031
335 725 271476
972 63 564912
93 425 108386
534 989 248507
473 762 410820
320 233 646059
115 666 671458
861 976 763689
205 692 959780
711 209 597027
264 31 896999
953 491 926372
438 181 587333
73 479 852502
179 222 6175
948 885 160...

output:

NIE

result:

ok single line: 'NIE'

Test #156:

score: 0
Accepted
time: 3ms
memory: 7944kb

input:

1000 10000
237 706 690929
562 598 968074
830 379 811610
87 433 508946
65 401 286664
177 669 700101
468 740 629017
558 86 667130
277 461 866536
621 12 689767
340 27 930290
687 283 213089
730 152 320959
443 352 624469
485 231 730285
416 548 370643
806 835 927754
291 481 14007
864 958 417341
650 648 38...

output:

NIE

result:

ok single line: 'NIE'

Test #157:

score: 0
Accepted
time: 6ms
memory: 7976kb

input:

1000 9107
462 343 359725
413 718 238428
107 767 651637
317 72 217074
72 340 110814
819 985 354434
269 709 663817
642 975 67722
246 855 552312
661 161 306498
526 555 347557
647 862 494592
825 51 110475
159 230 441212
30 361 346294
534 978 487766
809 973 11517
985 971 318039
990 883 327275
516 102 490...

output:

2917220

result:

ok single line: '2917220'

Test #158:

score: 0
Accepted
time: 10ms
memory: 8032kb

input:

1000 10000
247 998 59263
998 423 85260
423 934 284381
934 71 889687
71 471 694391
471 713 252285
713 844 77476
844 240 478762
240 558 35386
558 332 387848
332 468 599190
468 232 255869
232 816 171161
816 570 503951
570 308 501650
308 281 697317
281 215 636521
215 206 292758
206 164 71857
164 387 396...

output:

1893163

result:

ok single line: '1893163'

Test #159:

score: 0
Accepted
time: 7ms
memory: 8108kb

input:

1000 10000
880 440 801599
440 398 384597
398 662 641356
662 737 295096
737 159 799776
159 220 967702
220 565 584648
565 425 914151
425 670 770668
670 461 854480
461 110 483047
110 782 859671
782 216 769706
216 921 351047
921 521 41578
521 682 814980
682 373 158548
373 458 380395
458 573 739026
573 3...

output:

6323702

result:

ok single line: '6323702'

Test #160:

score: 0
Accepted
time: 6ms
memory: 7996kb

input:

1000 10000
686 274 885142
274 946 141552
946 833 613180
833 124 322762
124 59 114362
59 184 958425
184 661 288545
661 575 396575
575 682 580328
682 284 857380
284 677 694938
677 44 182156
44 642 551138
642 219 365564
219 449 634968
449 311 297484
311 443 426424
443 140 505567
140 883 190891
883 850 ...

output:

4162175

result:

ok single line: '4162175'

Test #161:

score: 0
Accepted
time: 2ms
memory: 8308kb

input:

1000 10000
177 696 613222
696 15 996297
15 526 120315
526 208 332709
208 56 735796
56 233 713307
233 293 992406
293 154 422472
154 99 942104
99 741 588734
741 783 835684
783 426 516942
426 537 529281
537 445 11137
445 301 432764
301 477 819131
477 96 236159
96 213 970086
213 900 536665
900 420 78737...

output:

3642831

result:

ok single line: '3642831'

Test #162:

score: 0
Accepted
time: 4ms
memory: 8312kb

input:

1000 10000
26 70 681304
70 22 260380
22 256 451720
256 565 989535
565 584 522065
584 373 80639
373 40 104184
40 506 988621
506 372 961083
372 871 182209
871 87 888547
87 348 714765
348 214 111216
214 53 546167
53 448 452341
448 822 238205
822 225 955638
225 449 741587
449 526 145167
526 357 95719
35...

output:

3982400

result:

ok single line: '3982400'

Test #163:

score: 0
Accepted
time: 8ms
memory: 8308kb

input:

1000 10000
189 723 848910
723 924 289291
924 11 154466
11 531 194410
531 976 39800
976 716 222232
716 160 750858
160 284 180884
284 224 66922
224 209 972388
209 201 365673
201 713 286894
713 761 98459
761 121 197361
121 146 323616
146 149 522646
149 651 203929
651 724 589952
724 879 406553
879 171 2...

output:

2569605

result:

ok single line: '2569605'

Test #164:

score: 0
Accepted
time: 8ms
memory: 7976kb

input:

1000 10000
149 42 93445
42 559 441535
559 220 784582
220 127 693367
127 979 916988
979 951 875764
951 684 762429
684 940 567184
940 723 164422
723 145 73444
145 635 3852
635 39 859426
39 180 361565
180 190 774352
190 202 80632
202 422 9257
422 261 394639
261 287 851481
287 270 352180
270 343 243951
...

output:

2883390

result:

ok single line: '2883390'

Test #165:

score: 0
Accepted
time: 7ms
memory: 8000kb

input:

1000 10000
108 488 548811
488 501 269075
501 466 888227
466 666 132202
666 804 166686
804 226 976745
226 661 681250
661 951 393684
951 258 236340
258 542 708572
542 125 702818
125 610 89341
610 743 378398
743 338 901071
338 968 29654
968 129 227015
129 16 809516
16 51 675079
51 592 343577
592 991 42...

output:

2858405

result:

ok single line: '2858405'

Test #166:

score: 0
Accepted
time: 3ms
memory: 8124kb

input:

1000 10000
190 962 270392
962 754 98353
754 950 911282
950 352 113796
352 239 216804
239 276 423002
276 277 362724
277 387 787886
387 899 655780
899 195 216133
195 928 675837
928 817 777884
817 906 809860
906 240 753541
240 225 897722
225 894 253116
894 783 959202
783 642 671283
642 403 765685
403 2...

output:

1986203

result:

ok single line: '1986203'

Test #167:

score: 0
Accepted
time: 7ms
memory: 8324kb

input:

1000 10000
44 106 179643
106 11 810145
11 105 956766
105 354 703612
354 762 417849
762 415 560539
415 636 907978
636 576 448039
576 173 712266
173 306 381848
306 432 700817
432 228 442206
228 851 906863
851 895 825834
895 562 26280
562 818 755991
818 648 472633
648 898 181474
898 719 135958
719 259 ...

output:

4988188

result:

ok single line: '4988188'

Test #168:

score: 0
Accepted
time: 10ms
memory: 8124kb

input:

1000 10000
897 554 564867
554 185 346683
185 263 954365
263 111 900677
111 160 332669
160 757 823751
757 94 897662
94 141 711394
141 405 554563
405 578 302692
578 41 673582
41 368 302283
368 587 592113
587 840 369607
840 108 485666
108 272 486429
272 229 745675
229 971 524561
971 932 903913
932 973 ...

output:

3163966

result:

ok single line: '3163966'

Test #169:

score: 0
Accepted
time: 8ms
memory: 8320kb

input:

1000 10000
236 199 31084
199 43 918989
43 422 184175
422 129 712990
129 907 493803
907 468 283654
468 528 694195
528 147 731481
147 994 168041
994 101 972846
101 915 120400
915 245 836476
245 931 228906
931 593 933550
593 750 309455
750 552 671171
552 618 255091
618 325 576693
325 361 615449
361 519...

output:

5189181

result:

ok single line: '5189181'

Test #170:

score: 0
Accepted
time: 32ms
memory: 8064kb

input:

1000 10000
512 643 332391
643 659 102013
659 470 200359
470 731 762972
731 191 149294
191 864 956265
864 175 833079
175 55 728407
55 389 542530
389 212 217977
212 270 148238
270 106 592664
106 374 396544
374 552 676924
552 481 805674
481 233 578539
233 820 209391
820 758 123192
758 544 104278
544 40...

output:

4265518

result:

ok single line: '4265518'

Test #171:

score: 0
Accepted
time: 4ms
memory: 8128kb

input:

1000 10000
270 995 726162
995 567 402075
567 617 698796
617 640 368283
640 837 83421
837 478 364767
478 934 146253
934 875 251718
875 709 186779
709 895 217644
895 165 248906
165 548 820249
548 539 559808
539 39 851568
39 464 555469
464 7 109804
7 499 271031
499 654 243317
654 154 216761
154 471 942...

output:

2553570

result:

ok single line: '2553570'

Test #172:

score: 0
Accepted
time: 35ms
memory: 8000kb

input:

1000 10000
908 646 306674
646 642 100941
642 591 265539
591 790 592635
790 880 184291
880 372 556513
372 723 368176
723 549 105458
549 615 940169
615 252 649058
252 394 749947
394 910 930650
910 465 224030
465 471 956276
471 339 410690
339 766 417855
766 738 228868
738 242 749950
242 269 836107
269 ...

output:

3377105

result:

ok single line: '3377105'

Test #173:

score: 0
Accepted
time: 16ms
memory: 8064kb

input:

1000 10000
420 355 323982
355 867 422046
867 824 184259
824 272 835023
272 206 705185
206 708 618757
708 780 857280
780 315 966042
315 960 4362
960 445 558483
445 685 243465
685 288 696166
288 8 254786
8 372 79536
372 837 395033
837 696 996452
696 841 863187
841 842 336437
842 831 417538
831 346 438...

output:

2885602

result:

ok single line: '2885602'

Test #174:

score: 0
Accepted
time: 34ms
memory: 8060kb

input:

1000 10000
147 125 636251
125 609 20845
609 57 576014
57 822 52630
822 236 419034
236 607 855843
607 521 244055
521 853 10102
853 705 282852
705 267 198815
267 288 321195
288 678 219031
678 197 852254
197 736 10806
736 435 1910
435 706 412726
706 251 400148
251 797 861345
797 732 774479
732 851 7987...

output:

1087847

result:

ok single line: '1087847'

Test #175:

score: 0
Accepted
time: 25ms
memory: 8056kb

input:

1000 10000
526 947 645188
947 104 960130
104 742 670612
742 726 448427
726 860 370459
860 614 514507
614 170 958265
170 19 646001
19 323 902632
323 367 719129
367 199 627154
199 932 741937
932 591 40268
591 673 767708
673 655 622050
655 226 322508
226 194 10489
194 444 687092
444 660 963316
660 692 ...

output:

1723515

result:

ok single line: '1723515'

Test #176:

score: 0
Accepted
time: 15ms
memory: 8132kb

input:

1000 10000
344 118 589791
118 980 832930
980 260 305427
260 361 33669
361 989 944326
989 271 816870
271 970 892964
970 909 946395
909 833 823630
833 140 677216
140 845 226958
845 754 412808
754 990 674663
990 229 699714
229 547 606718
547 404 534277
404 164 995363
164 94 755569
94 921 516186
921 887...

output:

2201206

result:

ok single line: '2201206'

Test #177:

score: 0
Accepted
time: 4ms
memory: 8036kb

input:

1000 10000
434 494 995388
494 720 612776
720 446 193840
446 730 327291
730 718 580250
718 961 184617
961 946 744882
946 806 308571
806 111 949994
111 227 556863
227 45 465581
45 989 331024
989 185 483713
185 391 910684
391 125 807353
125 731 198708
731 706 992375
706 105 448888
105 553 775335
553 13...

output:

3464181

result:

ok single line: '3464181'

Test #178:

score: 0
Accepted
time: 7ms
memory: 8008kb

input:

1000 10000
875 51 614292
51 736 394726
736 908 342472
908 744 493419
744 935 362300
935 655 143163
655 998 836714
998 603 994098
603 337 986702
337 988 224907
988 357 597428
357 363 109365
363 747 401505
747 135 399084
135 42 180002
42 625 252533
625 496 256110
496 55 699307
55 653 842566
653 217 75...

output:

1010793

result:

ok single line: '1010793'

Test #179:

score: 0
Accepted
time: 6ms
memory: 8324kb

input:

1000 10000
411 781 350845
781 975 18702
975 308 891147
308 121 260864
121 3 161443
3 574 3730
574 227 448921
227 606 562093
606 813 894562
813 186 472728
186 269 25208
269 444 588628
444 576 613479
576 694 970636
694 677 483256
677 898 687295
898 35 189246
35 572 863949
572 409 814281
409 762 706968...

output:

2373740

result:

ok single line: '2373740'

Test #180:

score: 0
Accepted
time: 11ms
memory: 8084kb

input:

1000 10000
903 391 287315
391 789 303491
789 841 298150
841 742 823349
742 649 111202
649 665 526099
665 272 176287
272 149 236671
149 122 788418
122 706 624286
706 604 180076
604 240 204795
240 225 733927
225 11 723358
11 470 146992
470 412 714634
412 958 970849
958 369 788203
369 664 744126
664 63...

output:

2241864

result:

ok single line: '2241864'

Test #181:

score: 0
Accepted
time: 15ms
memory: 8224kb

input:

1000 8017
688 384 506636
313 855 11479
814 715 687580
873 254 682057
599 459 456559
23 115 697167
523 772 139438
15 223 26365
822 120 448385
390 984 980331
399 162 792328
599 747 472192
296 584 315277
685 171 198988
977 485 41506
866 818 910741
975 208 307627
491 47 902223
849 334 750184
691 240 596...

output:

2689183

result:

ok single line: '2689183'

Test #182:

score: 0
Accepted
time: 9ms
memory: 7944kb

input:

1000 10000
918 757 651888
598 226 766034
932 377 28245
217 303 5826
406 421 255763
979 482 817199
190 320 146300
310 131 685188
756 532 120122
83 635 297162
744 618 694563
851 449 45094
99 450 738065
456 117 242772
702 360 464597
519 493 112796
576 323 787169
17 436 392429
431 454 195421
720 580 721...

output:

1791492

result:

ok single line: '1791492'

Test #183:

score: 0
Accepted
time: 8ms
memory: 8056kb

input:

1000 10000
542 838 724596
848 948 425244
412 304 724084
8 148 574741
670 990 212521
12 885 233467
412 552 271598
202 234 599488
903 711 430887
735 121 138664
106 495 358733
312 273 284385
820 304 592497
762 345 568517
354 566 899683
777 851 558399
64 621 527230
399 162 471471
448 175 798722
602 780 ...

output:

3832350

result:

ok single line: '3832350'

Test #184:

score: 0
Accepted
time: 3ms
memory: 7940kb

input:

1000 10000
649 427 998949
634 376 21205
636 648 547035
486 783 167873
118 507 120167
255 240 58665
150 777 528176
154 422 27761
840 64 483028
266 492 911739
278 695 750915
476 317 545771
810 155 498835
857 683 189570
830 455 887285
506 124 512198
722 355 125779
504 120 695996
135 676 510638
867 483 ...

output:

NIE

result:

ok single line: 'NIE'

Test #185:

score: 0
Accepted
time: 15ms
memory: 7984kb

input:

1000 10000
397 351 635488
649 206 188920
469 344 689853
398 711 163730
501 28 443286
720 584 58776
855 482 879674
61 851 23075
142 40 106851
903 24 977549
873 362 890340
926 785 526146
320 115 87263
917 163 935299
93 195 709621
435 178 455857
252 353 216574
553 300 226283
560 662 787596
243 269 6641...

output:

3130039

result:

ok single line: '3130039'

Test #186:

score: 0
Accepted
time: 4ms
memory: 8280kb

input:

1000 10000
354 791 968489
617 884 793995
837 845 309614
316 743 890816
652 696 640604
310 573 180686
869 168 373498
659 217 60532
223 803 783139
108 85 153400
91 238 417537
173 720 371693
394 573 999557
187 628 897791
735 685 550362
347 568 229023
309 683 444084
545 224 152329
956 748 215750
283 210...

output:

NIE

result:

ok single line: 'NIE'

Test #187:

score: 0
Accepted
time: 5ms
memory: 8276kb

input:

1000 10000
709 836 628476
751 56 371167
69 437 943331
949 552 767313
167 372 199409
643 959 279988
43 639 183880
670 101 948355
422 840 246617
622 708 16063
161 317 745442
91 473 377619
279 598 461123
965 483 721872
763 353 55211
794 422 29065
527 565 726344
423 654 905548
15 235 351726
173 600 7816...

output:

NIE

result:

ok single line: 'NIE'

Test #188:

score: 0
Accepted
time: 29ms
memory: 8060kb

input:

1000 10000
263 969 222471
664 392 192291
86 358 362786
929 888 217658
897 918 225324
605 870 145567
292 618 230708
24 580 26745
925 319 164363
931 740 368735
666 481 298511
127 632 441201
385 929 915593
394 535 473693
807 897 643364
104 278 215032
718 661 707167
445 841 723283
745 748 314207
715 194...

output:

2743978

result:

ok single line: '2743978'

Test #189:

score: 0
Accepted
time: 4ms
memory: 8068kb

input:

1000 10000
408 79 58002
645 298 384533
402 111 486869
215 400 14345
572 6 154562
638 538 278062
240 395 221078
66 823 140581
935 864 708848
856 451 593942
928 341 191206
583 822 686259
194 679 903173
748 546 624697
406 463 439209
663 819 877934
125 391 794007
746 92 10079
609 261 915727
394 900 4917...

output:

NIE

result:

ok single line: 'NIE'

Test #190:

score: 0
Accepted
time: 9ms
memory: 8068kb

input:

1000 10000
338 615 882450
225 445 340690
240 270 639622
397 628 819363
760 61 855816
52 512 590749
443 192 204307
960 852 515932
358 979 43242
66 89 314433
345 645 505152
899 707 912219
565 738 351846
128 381 700264
822 243 612976
722 885 179302
89 618 783054
607 125 668330
347 177 58819
19 902 4486...

output:

2395254

result:

ok single line: '2395254'

Test #191:

score: 0
Accepted
time: 3ms
memory: 7916kb

input:

1000 10000
923 367 285856
818 316 520959
165 574 19035
99 546 868936
717 846 435396
118 667 650196
285 482 847209
211 625 111098
879 729 776780
340 752 223111
993 92 397603
920 791 76572
302 404 204560
386 421 801685
309 288 866181
912 150 385847
540 984 234181
478 593 739132
482 129 387515
158 234 ...

output:

NIE

result:

ok single line: 'NIE'

Test #192:

score: 0
Accepted
time: 0ms
memory: 8252kb

input:

1000 10000
587 171 915083
521 100 55590
11 520 356848
775 805 424670
913 156 931385
503 740 242414
929 134 538192
827 686 971050
782 349 418840
616 795 498908
545 19 687861
14 719 107643
873 809 988497
644 385 955039
443 462 227280
662 519 343811
393 171 118642
619 656 59413
114 468 114412
672 681 8...

output:

NIE

result:

ok single line: 'NIE'

Test #193:

score: 0
Accepted
time: 12ms
memory: 7988kb

input:

1000 10000
829 414 169988
320 921 612884
773 590 643751
827 430 533307
83 598 517562
234 640 238462
150 696 471327
734 712 441849
882 844 751992
651 222 402157
459 294 622754
89 739 641170
205 916 279802
378 759 897482
447 326 282069
726 339 859920
411 559 447140
917 909 352992
980 956 174172
766 78...

output:

3209963

result:

ok single line: '3209963'

Test #194:

score: 0
Accepted
time: 4ms
memory: 7960kb

input:

1000 10000
71 797 884537
164 198 243210
287 379 368760
961 557 405409
901 596 541905
534 405 505985
125 791 320034
989 872 406087
652 93 858785
289 181 450740
353 133 378869
713 852 106053
56 357 61419
737 173 985412
538 902 58710
980 941 648096
17 384 734740
256 728 146827
746 892 229658
943 857 22...

output:

3157087

result:

ok single line: '3157087'

Test #195:

score: 0
Accepted
time: 7ms
memory: 8020kb

input:

1000 10000
2 998 879010
43 829 766194
938 535 330408
368 786 203666
662 12 274580
76 741 144058
499 778 788297
773 651 474631
830 277 610745
692 577 648139
578 422 467461
983 183 122493
798 369 601289
265 407 326242
586 303 364137
650 308 303047
430 57 914444
656 156 664437
300 777 241270
866 626 42...

output:

3488869

result:

ok single line: '3488869'

Test #196:

score: 0
Accepted
time: 11ms
memory: 8004kb

input:

1000 10000
592 958 185590
482 170 757095
809 85 71273
908 977 432267
359 196 7601
283 422 986939
752 822 702523
558 741 246517
582 667 698984
360 937 60386
447 810 247768
558 680 970290
92 844 620504
389 350 438685
151 383 950686
553 760 598586
591 404 650109
629 356 400411
176 325 648120
255 94 932...

output:

NIE

result:

ok single line: 'NIE'

Test #197:

score: 0
Accepted
time: 4ms
memory: 8256kb

input:

1000 10000
446 744 801220
714 198 949787
76 676 598722
481 408 457773
834 472 29983
999 495 891306
90 370 313642
998 413 185799
750 620 115389
447 172 99291
953 724 78755
785 471 790611
198 67 186335
36 279 478742
365 943 290293
705 606 636318
341 998 921663
648 926 318212
91 715 217228
774 466 3904...

output:

NIE

result:

ok single line: 'NIE'

Test #198:

score: 0
Accepted
time: 4ms
memory: 7984kb

input:

1000 10000
277 40 186310
774 908 344033
64 179 572332
348 940 236078
646 161 400000
844 357 20477
4 763 745411
583 153 105913
238 432 378995
249 659 106651
291 708 437108
939 777 49534
281 92 431457
670 7 559292
824 383 109361
486 640 756728
231 466 671392
486 205 647799
163 836 917184
14 553 545899...

output:

NIE

result:

ok single line: 'NIE'

Test #199:

score: 0
Accepted
time: 0ms
memory: 8008kb

input:

1000 10000
765 766 778759
604 692 13935
613 179 94881
373 328 871047
403 699 398744
697 452 526275
152 106 24142
414 34 20561
798 904 144282
146 178 239121
934 927 734106
142 188 924697
687 572 667001
761 729 604268
961 895 705282
236 248 911494
746 515 609335
979 685 896828
329 368 468641
730 505 9...

output:

NIE

result:

ok single line: 'NIE'

Test #200:

score: 0
Accepted
time: 24ms
memory: 7984kb

input:

1000 10000
591 316 969042
234 629 906359
726 722 738747
768 903 737747
740 682 353924
687 675 550470
571 639 915888
436 31 977571
818 478 914460
568 428 189201
143 348 124489
387 615 353048
646 619 610893
488 915 625633
106 427 685014
224 939 279083
600 111 676720
35 492 137967
6 986 180795
5 269 45...

output:

NIE

result:

ok single line: 'NIE'

Test #201:

score: 0
Accepted
time: 5ms
memory: 8264kb

input:

1000 10000
423 595 611656
933 782 707143
228 821 839095
200 594 833815
725 790 439684
340 85 507189
135 71 554769
849 331 229140
283 767 559360
723 42 221858
66 976 807950
253 851 994421
769 258 753026
900 85 981256
382 352 193635
592 977 313525
744 758 618383
598 712 673043
1000 450 853720
840 975 ...

output:

1849097

result:

ok single line: '1849097'

Test #202:

score: 0
Accepted
time: 18ms
memory: 7924kb

input:

1000 10000
500 865 38010
686 486 646258
42 53 731714
933 968 683418
934 754 826647
378 433 347262
442 358 141791
219 251 718632
700 785 210272
499 931 71425
551 687 27688
974 407 442028
413 706 715643
590 637 762558
366 532 312774
313 886 336023
986 455 76090
51 678 170100
986 851 112058
765 445 439...

output:

2836688

result:

ok single line: '2836688'

Test #203:

score: 0
Accepted
time: 4ms
memory: 8064kb

input:

1000 10000
73 103 694177
266 781 866816
593 886 678011
158 643 47727
17 708 338249
810 469 620928
53 510 375485
396 189 450085
105 314 344464
222 373 337672
958 656 387853
57 821 653384
595 400 841982
143 978 518737
179 554 418777
791 147 113044
681 510 151654
391 205 252497
949 570 352723
835 301 1...

output:

NIE

result:

ok single line: 'NIE'

Test #204:

score: 0
Accepted
time: 12ms
memory: 8276kb

input:

1000 10000
744 905 319659
717 774 304371
470 872 584815
245 950 573486
129 595 418308
744 332 468140
659 102 38806
162 138 290092
345 474 839525
488 270 971346
834 495 188983
148 623 888639
558 811 62086
484 756 730351
27 272 647844
157 323 677956
849 711 516249
329 267 932155
479 955 371705
265 551...

output:

2234870

result:

ok single line: '2234870'

Test #205:

score: 0
Accepted
time: 12ms
memory: 8056kb

input:

1000 10000
398 328 377504
133 382 972484
123 649 986657
848 640 107229
487 491 978656
997 621 411899
940 448 380960
681 835 657328
628 961 995665
86 660 462960
46 915 963070
436 781 358670
29 11 197088
8 508 454851
435 801 335239
86 672 342604
370 90 897657
457 388 132171
877 511 10862
229 291 55436...

output:

1269528

result:

ok single line: '1269528'

Test #206:

score: 0
Accepted
time: 23ms
memory: 7940kb

input:

1000 10000
782 737 876967
884 870 972284
77 346 781535
93 216 198939
694 113 671455
750 625 191653
693 190 369142
236 265 85632
383 852 541945
757 366 182052
531 355 442037
294 973 512657
334 689 570308
83 442 385055
607 31 717024
62 857 734448
724 389 102030
978 220 888768
295 5 984829
426 799 8244...

output:

3109046

result:

ok single line: '3109046'

Test #207:

score: 0
Accepted
time: 3ms
memory: 8072kb

input:

1000 10000
542 95 512457
907 132 29327
647 226 669900
61 82 749329
78 820 167267
618 423 199298
144 886 372651
781 236 787646
178 95 297661
951 453 997938
836 759 81099
194 109 584249
41 594 783728
998 45 95664
787 487 911054
895 150 475490
854 935 324764
912 17 926045
161 515 371391
88 969 386349
6...

output:

NIE

result:

ok single line: 'NIE'

Test #208:

score: 0
Accepted
time: 0ms
memory: 8292kb

input:

1000 10000
354 834 58287
184 880 781399
786 564 897107
671 706 43707
165 352 902963
97 133 242732
733 947 516545
5 289 911285
433 227 228556
737 315 691224
445 505 490371
634 623 590226
692 135 396459
397 312 695266
162 135 504849
818 411 626432
101 985 988613
451 389 69179
815 300 772230
842 761 96...

output:

3964708

result:

ok single line: '3964708'

Test #209:

score: 0
Accepted
time: 13ms
memory: 7940kb

input:

1000 10000
612 823 551712
197 832 530953
385 418 22981
340 28 907396
760 806 413929
113 90 411418
723 402 708955
302 28 1895
549 134 510398
261 557 981766
262 28 342882
261 140 110842
136 845 154627
604 726 70142
669 822 10335
523 597 620187
911 617 596599
716 956 867822
300 436 637242
897 525 23954...

output:

NIE

result:

ok single line: 'NIE'

Test #210:

score: 0
Accepted
time: 11ms
memory: 7964kb

input:

1000 10000
832 695 986224
760 366 121660
217 668 392011
947 758 576041
93 978 754247
530 465 576121
991 794 620170
634 747 186459
869 566 2708
991 411 439658
942 221 12265
295 40 235088
697 758 757207
407 673 382222
855 370 545072
741 780 181834
659 738 707911
968 797 756822
811 69 490217
294 149 79...

output:

1574161

result:

ok single line: '1574161'

Test #211:

score: 0
Accepted
time: 5ms
memory: 8064kb

input:

1000 10000
984 814 667045
899 543 561582
129 10 673087
346 226 304215
686 319 153014
492 631 431497
947 277 501778
523 746 723231
393 942 841867
95 173 397168
457 396 234255
531 31 408382
620 926 676476
66 549 989262
664 296 963723
630 747 822452
177 567 882185
196 23 697080
95 99 765796
964 100 612...

output:

4063714

result:

ok single line: '4063714'

Test #212:

score: 0
Accepted
time: 9ms
memory: 8008kb

input:

1000 10000
67 391 378822
252 844 932846
941 588 906107
636 223 981080
950 425 264155
297 726 287776
458 808 727214
656 412 441114
316 252 105305
194 420 166112
34 525 791014
437 783 696567
507 521 822461
174 284 627595
558 450 385686
586 187 508343
537 622 777390
689 200 413845
311 551 880445
943 80...

output:

NIE

result:

ok single line: 'NIE'

Test #213:

score: 0
Accepted
time: 20ms
memory: 7928kb

input:

1000 10000
770 420 788669
70 945 595058
485 332 835565
879 433 37284
654 30 496067
807 375 474841
567 235 863424
195 662 57028
900 675 526747
252 491 904350
778 761 225382
975 159 228442
27 84 165117
28 229 214641
588 228 162124
68 429 168011
238 80 761581
900 318 568727
384 541 9745
776 316 649533
...

output:

2296039

result:

ok single line: '2296039'

Test #214:

score: 0
Accepted
time: 23ms
memory: 7940kb

input:

1000 10000
589 153 731469
65 28 199791
463 113 991276
781 45 768577
90 401 836138
265 452 416594
397 481 531533
741 999 22334
200 213 249012
763 241 416458
394 528 398725
626 664 72963
888 11 452770
114 501 378998
557 273 412014
823 711 941463
786 74 355056
697 89 583
623 803 685691
895 72 426598
30...

output:

1987362

result:

ok single line: '1987362'

Test #215:

score: 0
Accepted
time: 0ms
memory: 8036kb

input:

1000 10000
850 704 810532
798 186 177940
858 915 515482
15 357 394010
125 907 328857
62 288 85431
64 584 817280
231 251 318816
96 697 413304
561 350 322389
712 989 254792
530 173 193765
15 988 980326
46 190 854684
422 321 430973
265 281 795281
105 269 321761
800 984 942193
673 272 354471
217 21 6367...

output:

NIE

result:

ok single line: 'NIE'

Test #216:

score: 0
Accepted
time: 4ms
memory: 8036kb

input:

1000 10000
510 70 871210
317 990 133969
299 311 428776
851 767 758649
196 220 958076
802 346 320759
263 648 866006
43 580 610130
342 284 624523
443 869 267122
246 137 6130
603 943 147697
906 133 814108
766 789 362622
12 309 825713
177 888 123361
450 725 361092
170 241 80056
265 656 821404
814 616 40...

output:

3722135

result:

ok single line: '3722135'

Test #217:

score: 0
Accepted
time: 4ms
memory: 8252kb

input:

1000 10000
344 74 807193
690 790 397491
456 336 810080
493 718 897381
465 349 256155
660 935 889865
869 121 45449
132 543 245198
539 493 120411
187 841 135235
955 339 93254
371 968 844772
645 971 271651
289 552 255534
709 863 871749
502 651 912499
341 950 690712
842 89 615751
746 143 664704
189 115 ...

output:

NIE

result:

ok single line: 'NIE'

Test #218:

score: 0
Accepted
time: 7ms
memory: 8296kb

input:

1000 10000
541 594 287188
304 308 608908
487 235 688071
384 967 134762
976 790 589059
239 507 748536
474 96 991866
477 544 687797
556 294 91549
253 834 81726
603 729 736936
702 398 803673
131 308 787965
457 465 987411
676 382 556449
555 408 239508
723 903 211147
654 414 404906
460 573 745547
679 848...

output:

NIE

result:

ok single line: 'NIE'

Test #219:

score: 0
Accepted
time: 8ms
memory: 7924kb

input:

1000 10000
674 866 255189
818 614 677256
799 538 450733
580 434 941967
698 2 904222
643 35 694991
460 851 322477
279 443 81500
597 695 290685
408 245 971009
695 770 892486
858 111 278115
659 371 841262
986 544 345084
418 444 21428
403 185 720474
544 246 820859
467 971 154338
169 838 12143
779 443 16...

output:

NIE

result:

ok single line: 'NIE'

Test #220:

score: 0
Accepted
time: 4ms
memory: 7996kb

input:

1000 10000
657 579 700998
486 214 287873
278 21 58145
929 898 179758
868 897 372847
669 722 720528
778 918 580553
174 61 282513
636 822 105177
823 759 819412
147 383 471621
707 170 113981
751 951 165806
953 433 472237
382 121 954362
167 191 499186
794 72 578962
589 605 227362
490 305 82664
174 293 3...

output:

NIE

result:

ok single line: 'NIE'

Test #221:

score: 0
Accepted
time: 6ms
memory: 7896kb

input:

1000 6084
477 989 37878
652 983 512707
268 348 424205
196 630 56467
244 685 883093
944 236 130778
554 230 611785
399 273 951738
876 589 973539
884 350 425610
675 850 533946
443 248 609500
368 163 191734
330 608 115973
367 489 847356
103 4 957406
449 625 661755
75 201 450870
417 786 811497
17 958 730...

output:

4309840

result:

ok single line: '4309840'

Test #222:

score: 0
Accepted
time: 3ms
memory: 8256kb

input:

1000 8974
352 116 338862
349 580 970557
979 105 10340
683 648 286985
946 760 140649
784 403 994284
598 768 36581
364 635 657110
775 221 435011
735 992 888058
857 760 376815
233 388 871796
603 887 425009
184 436 949506
979 550 491054
958 548 977343
762 277 247673
84 599 228520
839 407 913834
917 504 ...

output:

NIE

result:

ok single line: 'NIE'

Test #223:

score: 0
Accepted
time: 2ms
memory: 7956kb

input:

1000 9466
719 878 337546
238 626 474280
547 468 659098
731 700 803331
355 388 207950
200 473 218493
526 873 44198
86 906 817518
878 223 566933
48 486 466660
102 495 747343
904 218 757227
550 390 152252
6 615 382677
107 291 350335
107 62 954552
447 616 306440
639 661 41642
754 415 801244
656 9 465431...

output:

NIE

result:

ok single line: 'NIE'

Test #224:

score: 0
Accepted
time: 3ms
memory: 8160kb

input:

1000 6414
111 78 646044
236 786 141374
426 665 928972
682 724 826214
437 249 980984
440 561 342879
199 339 179106
113 189 741310
289 737 317038
468 58 221990
610 383 32315
614 16 616027
583 700 141837
643 657 729739
205 679 5641
510 668 670232
919 193 228049
9 857 952510
83 184 253878
147 118 297346...

output:

NIE

result:

ok single line: 'NIE'

Test #225:

score: 0
Accepted
time: 0ms
memory: 8180kb

input:

1000 7575
413 744 348900
567 411 975379
261 796 41966
160 766 184632
197 490 953793
319 894 530973
772 988 497174
689 103 950832
554 673 658
349 629 442596
361 809 81603
59 550 172478
689 827 434242
279 304 837628
36 80 94399
900 635 640867
733 321 451282
108 945 716929
908 61 195884
929 524 15389
6...

output:

NIE

result:

ok single line: 'NIE'

Test #226:

score: 0
Accepted
time: 2ms
memory: 7908kb

input:

1000 4624
678 99 386068
759 143 701039
198 200 706829
22 38 316247
437 185 820349
615 12 843660
808 853 773002
941 231 480171
733 523 508250
33 592 669956
661 451 779291
214 86 154011
668 970 346384
949 451 728387
562 297 840156
614 268 748128
319 99 595287
717 795 362478
824 10 55125
502 232 378805...

output:

NIE

result:

ok single line: 'NIE'

Test #227:

score: 0
Accepted
time: 0ms
memory: 8072kb

input:

1000 3770
608 553 440102
270 788 90808
103 156 378387
219 185 46021
133 1 336933
808 736 334894
595 31 987358
33 547 976428
43 326 997655
153 718 878289
879 499 275238
695 577 22859
352 336 882375
999 86 546141
482 363 934475
226 35 899138
807 566 423952
168 473 72058
514 535 414710
206 701 214870
7...

output:

NIE

result:

ok single line: 'NIE'

Test #228:

score: 0
Accepted
time: 3ms
memory: 8064kb

input:

1000 9907
330 151 120747
475 170 736977
852 611 418079
401 315 855630
487 511 168999
165 720 612158
919 815 877868
128 619 464139
346 101 996901
573 172 388444
361 624 331583
740 272 205852
560 441 109459
607 518 798378
735 913 905676
83 74 829167
304 635 719680
863 681 119211
209 166 961644
12 536 ...

output:

NIE

result:

ok single line: 'NIE'

Test #229:

score: 0
Accepted
time: 3ms
memory: 7976kb

input:

1000 7322
693 601 265581
802 375 113629
195 179 742205
27 466 307067
828 165 752025
433 174 438082
838 918 226536
16 266 212390
756 286 608072
188 552 974402
342 760 711602
690 691 545635
528 45 47338
689 450 222638
421 527 271156
222 816 422764
148 521 120341
33 331 392168
132 278 75237
421 903 752...

output:

NIE

result:

ok single line: 'NIE'

Test #230:

score: 0
Accepted
time: 0ms
memory: 7900kb

input:

1000 6675
722 387 166244
21 768 341173
302 783 491423
44 446 564185
465 687 953279
701 863 562273
590 564 707075
320 252 657076
143 485 212305
922 94 113666
63 174 222219
186 898 923220
154 68 704839
559 931 680676
457 381 725141
779 444 936754
693 952 268321
433 300 684888
99 372 325519
141 603 177...

output:

NIE

result:

ok single line: 'NIE'

Test #231:

score: 0
Accepted
time: 2ms
memory: 7764kb

input:

1000 1744
295 748 424191
430 402 442230
982 602 774020
256 962 308871
347 987 694039
65 751 876690
322 892 987266
813 306 302452
985 91 174408
655 789 914704
15 759 764720
688 473 355142
379 724 150760
163 328 63017
432 498 240930
176 619 903449
918 78 632272
190 619 757162
960 297 156387
606 93 995...

output:

NIE

result:

ok single line: 'NIE'

Test #232:

score: 0
Accepted
time: 3ms
memory: 8048kb

input:

1000 9536
81 898 854242
177 930 731390
563 269 598431
742 876 667829
969 735 957859
25 304 972683
566 139 405939
605 866 328573
160 435 159310
919 689 703804
44 628 298607
136 872 799842
17 762 936276
259 358 571376
941 532 591066
651 536 506757
131 750 790881
654 800 885153
842 361 777663
236 155 5...

output:

NIE

result:

ok single line: 'NIE'

Test #233:

score: 0
Accepted
time: 2ms
memory: 7764kb

input:

1000 1689
514 228 725760
444 320 395547
667 862 585493
12 189 358145
860 392 690837
515 502 535695
407 230 545499
536 988 3661
230 32 158684
524 215 250244
40 227 288007
46 751 961835
45 137 783168
487 817 821199
928 917 349744
135 812 266948
26 302 767586
139 571 167429
375 855 35063
578 399 749371...

output:

NIE

result:

ok single line: 'NIE'

Test #234:

score: 0
Accepted
time: 4ms
memory: 8052kb

input:

1000 9633
422 129 759597
315 471 131196
233 90 429643
317 441 123176
287 175 670146
459 604 346209
174 751 763371
439 578 217719
987 458 192061
273 148 432865
898 666 905899
636 955 644214
995 614 400235
913 325 785040
162 216 418266
597 329 831068
403 237 142674
411 236 691719
215 338 890769
88 335...

output:

NIE

result:

ok single line: 'NIE'

Test #235:

score: 0
Accepted
time: 0ms
memory: 7772kb

input:

1000 1869
235 382 997875
687 262 99131
522 257 912214
572 468 306540
33 316 242639
99 322 290839
688 700 141724
657 727 495845
545 879 502355
602 424 177898
306 814 201680
603 943 242737
320 377 960626
204 241 517543
929 429 991466
142 756 881819
247 50 875427
859 429 67069
164 120 214601
528 52 360...

output:

NIE

result:

ok single line: 'NIE'

Test #236:

score: 0
Accepted
time: 4ms
memory: 7880kb

input:

1000 6255
498 390 135377
954 876 606515
622 679 609195
815 492 12797
484 396 321593
596 813 875205
207 462 111374
447 967 865267
589 374 908964
987 632 523130
750 351 220111
618 566 716963
257 19 807593
737 227 302132
479 852 136435
834 209 16649
545 985 578684
700 234 14236
131 736 101193
242 726 1...

output:

NIE

result:

ok single line: 'NIE'

Test #237:

score: 0
Accepted
time: 15ms
memory: 7972kb

input:

1000 9427
274 779 493507
350 282 271312
25 184 739138
712 251 721094
906 236 734429
421 502 317743
506 383 144023
882 232 775213
710 841 877724
865 76 82398
884 104 760483
742 199 897584
62 901 938696
892 226 435980
623 984 2009
723 545 440736
93 345 343406
685 622 746372
314 601 899429
566 461 9899...

output:

NIE

result:

ok single line: 'NIE'

Test #238:

score: 0
Accepted
time: 4ms
memory: 7976kb

input:

1000 7167
267 855 737795
536 548 735126
481 347 541611
208 761 559767
494 453 188199
432 438 566999
940 730 719350
612 505 899853
8 145 12910
421 951 207556
553 366 680072
168 482 13329
574 322 252859
497 180 688105
26 124 667683
489 921 477989
240 101 781965
79 552 292207
229 344 218919
113 909 372...

output:

2748890

result:

ok single line: '2748890'

Test #239:

score: 0
Accepted
time: 0ms
memory: 7700kb

input:

1000 2239
278 746 870077
792 323 790523
147 883 839198
739 924 928888
592 749 852505
34 70 580350
560 341 691901
975 719 41439
375 513 779898
267 54 580411
669 686 312551
271 836 205486
301 608 618800
330 980 646289
629 594 599029
54 784 202525
167 708 22296
769 873 273415
248 270 871189
237 551 731...

output:

NIE

result:

ok single line: 'NIE'

Test #240:

score: 0
Accepted
time: 2ms
memory: 8080kb

input:

1000 3572
650 697 827792
863 606 660531
517 198 881817
949 520 404129
215 4 586264
843 446 26590
410 964 831621
493 606 915463
480 430 361169
953 790 367587
800 639 968080
582 640 655272
552 609 274396
617 900 375407
641 112 847816
613 436 557616
628 421 710417
501 46 670941
17 721 293244
944 173 61...

output:

NIE

result:

ok single line: 'NIE'

Test #241:

score: 0
Accepted
time: 0ms
memory: 8060kb

input:

1000 9788
194 545 95000
965 327 837593
435 62 636419
414 915 877352
133 982 577177
94 591 475970
927 877 293447
85 158 573958
349 848 815828
270 257 769140
146 835 675907
368 575 466320
860 142 838007
278 139 6259
487 238 961877
92 829 69799
384 166 976421
418 964 272471
956 127 484775
637 496 91157...

output:

NIE

result:

ok single line: 'NIE'

Test #242:

score: 0
Accepted
time: 2ms
memory: 7796kb

input:

1000 674
170 411 608046
624 787 48068
190 387 250133
767 871 290588
755 379 452885
538 968 274082
642 756 403289
905 831 700038
162 947 667606
767 174 710894
997 346 958861
895 427 321166
42 217 167761
618 273 730478
998 867 982091
788 409 111354
263 910 669824
603 981 97988
509 112 970759
540 500 6...

output:

NIE

result:

ok single line: 'NIE'

Test #243:

score: 0
Accepted
time: 0ms
memory: 8128kb

input:

1000 4784
740 83 170224
620 201 483749
566 178 103097
852 16 417608
624 35 815867
472 188 112252
916 718 549424
464 692 864044
829 529 829083
71 963 923345
339 571 225781
359 893 641767
555 838 116702
864 987 855783
953 747 43998
289 630 478202
169 977 998827
630 994 242025
379 63 623675
624 928 420...

output:

NIE

result:

ok single line: 'NIE'

Test #244:

score: 0
Accepted
time: 6ms
memory: 7992kb

input:

1000 7682
940 159 868015
901 368 156312
27 535 384225
712 690 389337
212 722 120056
476 151 25751
173 837 775175
388 71 613757
170 588 130280
512 195 6564
458 974 65960
482 260 740897
312 466 551794
119 818 34616
293 177 987015
815 803 861145
529 85 986440
729 860 126040
369 47 115930
889 793 950019...

output:

NIE

result:

ok single line: 'NIE'

Test #245:

score: 0
Accepted
time: 2ms
memory: 7740kb

input:

1000 3136
316 661 71814
975 601 399265
52 937 210011
726 191 527139
559 823 925852
361 961 678279
28 328 522001
345 188 416096
704 405 173351
201 681 689406
987 420 282718
404 172 45226
592 838 188825
994 660 364796
694 709 461899
442 557 312629
546 41 771879
535 795 271392
973 134 500198
666 659 60...

output:

NIE

result:

ok single line: 'NIE'

Test #246:

score: 0
Accepted
time: 0ms
memory: 7820kb

input:

1000 4594
147 239 415620
319 910 435709
376 720 611853
137 490 784092
589 938 369845
535 322 491431
247 224 186554
171 523 650134
285 418 330483
120 345 89085
200 81 658332
210 844 653466
582 353 258158
784 808 680209
142 156 958250
472 344 554113
736 875 641929
486 563 895239
313 93 973416
664 97 5...

output:

NIE

result:

ok single line: 'NIE'

Test #247:

score: 0
Accepted
time: 2ms
memory: 7780kb

input:

1000 2107
936 895 620434
222 712 267758
108 450 832434
345 389 228844
744 99 600739
411 712 13947
759 38 906347
703 18 100462
465 646 63331
121 457 474107
789 878 912359
757 891 898384
783 670 612054
701 68 592383
868 374 426372
333 893 306069
191 253 800799
975 228 545865
280 40 263516
117 575 2703...

output:

NIE

result:

ok single line: 'NIE'

Test #248:

score: 0
Accepted
time: 2ms
memory: 7776kb

input:

1000 2673
580 145 73885
527 41 487265
347 615 680924
975 615 746803
39 510 773174
608 881 983262
805 600 170336
559 51 957451
381 47 346573
609 34 84693
284 210 454665
825 754 993947
621 832 694766
585 83 138676
243 187 168946
943 6 757143
318 166 572262
371 107 230248
343 828 406944
227 650 206367
...

output:

NIE

result:

ok single line: 'NIE'

Test #249:

score: 0
Accepted
time: 0ms
memory: 7784kb

input:

1000 479
192 20 303540
457 864 612401
958 697 796928
111 119 265548
31 566 408108
278 499 318632
505 51 542495
45 113 532883
283 811 249984
403 741 547817
357 349 321944
763 997 309149
570 735 164615
538 188 76868
371 838 883950
497 157 588809
516 198 19909
846 722 14344
700 288 208017
398 760 47671...

output:

NIE

result:

ok single line: 'NIE'

Test #250:

score: 0
Accepted
time: 2ms
memory: 7776kb

input:

1000 446
736 287 484898
524 649 39876
181 493 948223
786 661 957621
736 658 816711
21 214 5812
846 176 336691
562 634 745908
162 146 270714
804 662 25115
108 39 701442
30 824 463740
225 983 19999
413 343 753614
349 134 863336
144 1 85204
202 690 786993
898 451 966074
511 220 319240
703 671 291812
96...

output:

NIE

result:

ok single line: 'NIE'

Test #251:

score: 0
Accepted
time: 0ms
memory: 8172kb

input:

1000 6641
328 932 3811
332 778 335118
48 425 541748
189 968 155902
961 341 518738
787 780 910254
129 390 563485
303 794 283808
75 240 70970
946 776 414890
713 241 420388
387 542 337590
57 227 718324
232 193 303654
733 66 769000
460 710 51659
224 580 603729
367 495 208331
137 774 30755
550 958 991755...

output:

NIE

result:

ok single line: 'NIE'

Test #252:

score: 0
Accepted
time: 3ms
memory: 7996kb

input:

1000 8083
247 700 899797
334 601 458898
657 311 945725
113 778 304505
630 687 471197
499 463 766857
774 363 544539
123 306 388019
751 725 295341
525 685 755390
173 375 990122
117 80 586507
117 930 566943
491 523 295547
867 671 793282
48 493 626421
550 238 661037
300 286 757124
640 707 705549
587 332...

output:

NIE

result:

ok single line: 'NIE'

Test #253:

score: 0
Accepted
time: 4ms
memory: 7876kb

input:

1000 8442
423 343 202366
907 658 300832
689 960 940131
708 477 870927
359 722 789798
995 681 34187
669 26 341432
702 261 503970
621 449 61130
505 640 507303
143 982 824623
789 372 300022
556 361 79873
479 560 764580
538 388 468658
592 714 568773
115 817 612174
943 447 371105
730 757 50161
770 555 70...

output:

4397994

result:

ok single line: '4397994'