QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#47342#4674. Lots Of Tasksaurelion_solAC ✓6ms4020kbC++141.5kb2022-09-08 11:42:382022-09-08 11:42:39

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-08 11:42:39]
  • 评测
  • 测评结果:AC
  • 用时:6ms
  • 内存:4020kb
  • [2022-09-08 11:42:38]
  • 提交

answer

#include<bits/stdc++.h>
#define rp(i,a,b) for(int i=a,_=b;i<=_;++i)
#define pr(i,a,b) for(int i=a,_=b;i>=_;--i)
#define pb push_back
using namespace std;
typedef vector<int> VI;
const int N=205;
int n,m,cnt[3*N],sum[3*N],bg[2*N],ed[2*N];
bool dp[2*N][3*N];
VI tmp;
struct range{
	int l,r,id;
	bool operator<(const range &o)const{return l<o.l||(l==o.l&&r<o.r);}
}a[2*N];
inline int get(int x){return lower_bound(tmp.begin(),tmp.end(),x)-tmp.begin()+1;}
int main(){
	scanf("%d",&n),n*=2;
	for(int i=1;i<=n;i+=2){
		scanf("%d%d",&a[i].l,&a[i+1].r);
		a[i].r=a[i+1].l=(a[i].l+a[i+1].r)>>1;
	}
	rp(i,1,n)a[i].id=i,tmp.pb(a[i].l),tmp.pb(a[i].r);
	sort(tmp.begin(),tmp.end());
	tmp.resize(unique(tmp.begin(),tmp.end())-tmp.begin());
	m=tmp.size();
	rp(i,1,n)++cnt[a[i].l=get(a[i].l)],--cnt[a[i].r=get(a[i].r)];
	rp(i,1,m)cnt[i]+=cnt[i-1];
	rp(i,1,m)sum[i]=sum[i-1]+((!cnt[i])!=(!cnt[i-1]));
	sort(a+1,a+n+1);
	rp(i,1,n){
		bg[i]=cnt[a[i].l]&&!cnt[a[i].l-1]?sum[a[i].l]:-1;
		ed[i]=!cnt[a[i].r]&&cnt[a[i].r-1]?sum[a[i].r]:-1;
	}
	bool ans=0;
	rp(i,1,n){
		if(bg[i]==1){
			dp[i][a[i].l]=1;
		}
		rp(k,a[i].l,a[i].r-1)if(dp[i][k]){
			rp(j,i+1,n)if(a[j].l>k&&a[j].l<=a[i].r&&a[j].r>a[i].r&&((a[i].id-1)^(a[j].id-1))!=1)dp[j][a[i].r]=1;
		}
		if(~ed[i]){
			bool b=0;
			rp(k,a[i].l,a[i].r-1)if(dp[i][k]){b=1;break;}
			if(!b)continue;
			if(ed[i]==sum[m])ans=1;
			rp(j,i+1,n)if(bg[j]==ed[i]+1)dp[j][a[j].l]=1;
		}
	}
	puts(ans?"YES":"NO");
	return 0;
}

详细

Test #1:

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

input:

4
1 9
5 13
11 13
6 12

output:

YES

result:

ok answer is YES

Test #2:

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

input:

3
46 76
0 2
45 75

output:

NO

result:

ok answer is NO

Test #3:

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

input:

10
364982626 705073316
215175753 478059739
828386201 994402901
910820793 911394551
266699249 426536243
719535057 815124115
623551500 911107672
705073316 733996798
93555423 439843075
421091507 535027971

output:

YES

result:

ok answer is YES

Test #4:

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

input:

10
51835689 620807443
750787525 796909711
513533935 575395493
541578125 684873005
537565421 613225565
617887598 929809638
255789102 452077882
336321566 371545418
684873005 816702045
359691050 544464714

output:

YES

result:

ok answer is YES

Test #5:

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

input:

8
572132975 786288271
467448988 567426274
105311006 105804388
82568617 105557697
105804388 483353486
127607255 517437631
455641925 679210623
266635431 322522443

output:

NO

result:

ok answer is NO

Test #6:

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

input:

8
148459525 345343515
502457315 746706787
288511258 298478650
276770399 417832891
246901520 330120996
294124965 347301645
417832891 587081739
293494954 347931656

output:

NO

result:

ok answer is NO

Test #7:

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

input:

9
166442441 389739205
7943919 166442441
286208703 431033671
431033671 456326329
241885163 330226185
278090823 294020525
84893800 89492560
443680000 749236104
330226185 387016189

output:

NO

result:

ok answer is NO

Test #8:

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

input:

9
282962511 581565901
181537158 549056140
662985805 666211931
480229505 852194357
773418109 939896935
103399690 259674626
298329092 432264206
852194357 861120687
498532934 664598868

output:

YES

result:

ok answer is YES

Test #9:

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

input:

10
552212097 559434409
632141489 650923207
768930601 851058249
83468611 310952913
514134095 768930601
19285638 63747984
41516811 125420411
507571217 604075289
486727329 632141489
197210762 817931672

output:

NO

result:

ok answer is NO

Test #10:

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

input:

10
861285491 928841189
8619266 43933564
34883256 974780518
895063340 949668240
504831887 662689811
468624021 698897677
26276415 36906263
536509863 861285491
895880341 948851239
31591339 38175173

output:

NO

result:

ok answer is NO

Test #11:

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

input:

9
79 113
50 78
14 76
62 66
77 79
0 6
96 98
3 25
28 62

output:

NO

result:

ok answer is NO

Test #12:

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

input:

8
57 69
41 55
59 63
29 31
30 62
46 50
69 97
55 67

output:

NO

result:

ok answer is NO

Test #13:

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

input:

10
1 3
2 64
8 58
58 86
71 73
72 74
61 87
81 93
92 94
88 100

output:

YES

result:

ok answer is YES

Test #14:

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

input:

10
18 44
25 37
31 43
36 50
36 64
64 66
65 77
71 89
80 82
73 89

output:

YES

result:

ok answer is YES

Test #15:

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

input:

25
64 66
70 78
66 74
59 65
26 36
3 47
62 64
25 27
58 60
35 37
31 39
53 57
74 96
45 47
91 95
94 96
87 89
55 61
36 56
88 98
49 53
85 87
85 87
63 67
47 55

output:

NO

result:

ok answer is NO

Test #16:

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

input:

71
18 20
9 13
62 64
57 59
4 6
78 80
88 90
3 5
21 23
27 29
63 65
86 88
37 39
33 35
56 62
5 9
54 56
35 39
62 76
19 21
1 3
14 18
47 49
11 15
20 22
95 99
14 16
65 73
19 21
82 86
53 55
38 42
79 85
1 3
43 47
31 33
61 63
32 34
48 50
50 52
41 45
89 91
5 9
25 27
97 99
84 86
39 41
93 95
0 2
23 25
41 43
89 91
...

output:

NO

result:

ok answer is NO

Test #17:

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

input:

80
72 74
63 65
6 8
5 7
88 90
77 79
25 27
18 20
60 62
89 91
18 20
20 24
57 59
76 78
86 88
66 68
33 35
32 34
9 11
60 62
67 69
42 46
76 78
98 100
13 17
83 85
63 65
8 10
50 54
27 31
91 95
73 75
80 82
92 96
47 49
5 7
92 94
33 35
78 80
45 47
17 19
64 66
36 38
80 82
24 26
25 27
38 40
30 34
82 84
11 13
72 7...

output:

YES

result:

ok answer is YES

Test #18:

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

input:

44
617869046 627834356
851982537 874829039
807157583 834233621
458983124 462619250
131396170 158629090
192964089 234717487
103417392 213840788
495630899 528166949
603160795 665283859
462619250 510141044
665283859 669582001
501957752 554376146
778716206 950919626
12844512 17067144
202250906 269153452...

output:

YES

result:

ok answer is YES

Test #19:

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

input:

47
676488967 746027013
656793864 676415986
604934303 608584477
176031497 203105489
383164433 422436915
858092756 946285114
481802491 504864091
478941475 532579613
247295552 285849148
598868671 610999935
636384112 677203616
286137979 303324275
505359028 559800198
402800674 445278582
503967638 5057605...

output:

YES

result:

ok answer is YES

Test #20:

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

input:

30
579134551 644480357
659385150 900543406
11217972 172557440
761808458 789494544
338362294 479090662
771338724 779964278
573336813 579134551
460925279 497256045
325121912 344334728
362550005 384553197
648709097 677739755
668270819 699304071
326119451 362550005
338376724 408726478
838687790 96239902...

output:

YES

result:

ok answer is YES

Test #21:

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

input:

52
117865740 132231160
777875456 858199670
915615602 921504072
542019435 584658903
203050833 300787023
250649472 253188384
278312532 323261514
157826931 167587331
391023643 396022349
240004394 250649472
797839503 918559837
422408008 537532652
179472203 210647075
189708551 200410727
592087158 6169188...

output:

YES

result:

ok answer is YES

Test #22:

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

input:

38
780360547 866890377
223057332 255363646
468083574 487755168
878692720 885741112
683090408 806520772
423810556 468083574
59686117 97630661
779810351 800486811
178701923 193361709
815122144 823625462
643838278 659186420
893339322 938156874
78658389 152868527
193361709 214109651
931056264 945257484
...

output:

YES

result:

ok answer is YES

Test #23:

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

input:

200
917216022 945176098
644736571 644771563
757942456 758446070
945177037 949308659
134938795 136955211
968484334 970356708
415630070 418409736
722030749 731690755
897609125 908417361
560529575 572116123
389507535 400816461
140487140 147478516
940084524 958532794
668917765 671774463
758446070 764908...

output:

YES

result:

ok answer is YES

Test #24:

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

input:

200
564009044 566646348
489321840 505719032
576714010 577673160
836329982 842201718
227694445 231855973
839066689 839465011
831495306 834766478
975057167 988649479
215160345 252979829
700667907 711226121
641059794 645593788
158742164 180128918
638994680 653191276
826370653 839891131
33794938 3695662...

output:

NO

result:

ok answer is NO

Test #25:

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

input:

200
730440387 751089761
840152901 851632755
27658742 34815040
821723842 826708560
148162815 173563321
768113961 777759663
580517480 582856248
246035953 260866787
717514712 720069272
526004060 531322566
270521837 270905773
718304699 722024499
41742274 43517792
796810857 807334593
581686864 589230312
...

output:

NO

result:

ok answer is NO

Test #26:

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

input:

200
520272239 535665199
179950845 185293863
497226947 664979589
591752974 625923486
41537780 304374196
84933994 272623948
29915279 134303049
44914232 516933146
38201591 718281401
142913520 161125104
454943885 688754283
422162335 684161145
430940739 890261279
259241818 568678618
434897021 520058787
4...

output:

YES

result:

ok answer is YES

Test #27:

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

input:

200
181568998 872135630
527156634 844675716
645344301 801405199
357959752 506651850
702385141 783321883
813414428 861719080
35803739 328827513
514080165 682836221
451752743 523409569
663299776 905675992
731185308 986374954
32238600 553820910
87782465 352857923
349601848 506800518
439540752 769512686...

output:

YES

result:

ok answer is YES

Test #28:

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

input:

200
54062010 66611560
508537133 516075257
903667907 907641349
850095188 850399312
376223376 377827328
699897074 703120076
894976504 902196288
258410261 279189205
696944899 701508575
259615477 262955055
927478457 930460269
958470189 960773927
801942188 803409930
364644423 373457685
243975580 24690599...

output:

YES

result:

ok answer is YES

Test #29:

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

input:

200
50439839 224063881
78826582 352402426
439223682 738055498
390140739 563210293
536312651 970096879
258646437 473316875
36795550 191484198
209523308 984481996
497953938 534630026
11937426 909875482
248302325 478990289
314097952 899114804
525575337 814703739
141256996 982995160
89017203 342352055
2...

output:

YES

result:

ok answer is YES

Test #30:

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

input:

200
852476723 852588999
443587474 451924124
401251295 406384845
193585727 196118045
146527298 149606572
666892340 700273682
681882169 685283853
7421265 40176795
84201200 88820958
624248523 634005523
619365869 619588561
984470495 988945621
958255151 959732183
190752155 196419299
296365353 374948721
9...

output:

NO

result:

ok answer is NO

Test #31:

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

input:

200
737404489 753882603
503367026 507336346
743296800 744902272
123701703 126102215
742555526 745643546
183715853 205328419
274136097 283501361
289736924 290686338
25927756 62006948
53536987 61972697
469274257 483717937
778912375 785989995
122907208 127634116
856091887 881840937
270909481 274136097
...

output:

YES

result:

ok answer is YES

Test #32:

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

input:

200
537579707 561026775
534330893 541827039
352185093 359903163
518570246 530107754
645259837 664831033
703255480 717501344
73223202 75741974
510870652 515186054
471129912 477765692
470729499 478758477
890467593 907896277
153821946 160937540
826511354 836820218
385898395 387682893
219650509 22341995...

output:

NO

result:

ok answer is NO

Test #33:

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

input:

200
607280704 634418928
140359022 140549356
313201420 336518468
43645137 46254839
880070690 880111726
283829341 289201691
605289085 606689743
120641506 121015928
357781277 366341547
424501988 429298466
515012064 553679932
400912771 414609177
647266656 744845312
897751497 901081489
918911707 92246349...

output:

YES

result:

ok answer is YES

Test #34:

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

input:

200
411544178 411804338
764037653 766542321
432048181 434377957
754478238 760553796
221108651 222836211
352432599 356807473
604641535 643887707
668735641 681638481
471842027 478113845
237128524 251651996
732241211 739458007
374646494 390135094
903572141 904437001
982268373 982949429
836793274 840219...

output:

NO

result:

ok answer is NO

Test #35:

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

input:

200
495988149 692160689
783047071 911794217
223310607 394712225
53584242 96741156
15506694 686991012
233532726 887882918
21017921 343929323
217042428 809476470
522672639 631546573
501168496 827890138
468432988 520482490
122396578 426421718
665219042 826495958
86037086 974163516
945680991 959992503
7...

output:

YES

result:

ok answer is YES

Test #36:

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

input:

200
167568281 172863767
430099597 439632769
134704018 156103714
844090222 847965666
985052446 998386780
384499950 387865434
421400588 438798606
836119324 846027944
500908751 501478075
76371858 81448130
642369334 642642268
461668936 478944500
13856422 93693120
319436529 328935859
270194207 278741767
...

output:

YES

result:

ok answer is YES

Test #37:

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

input:

200
228458735 233318517
729599969 735397921
623662426 633757052
819413654 824165614
77759788 79342180
847765604 855265296
924070075 939502083
469497033 472499983
915740460 945193828
754033647 757312407
222629381 234288089
368585887 370835539
841518847 861512053
360124023 368585887
300329908 31603046...

output:

YES

result:

ok answer is YES

Test #38:

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

input:

200
515751800 520866672
724362208 731300852
702755349 708846079
263589677 299710943
94352385 124190305
180836575 193524741
549413342 565732960
788015204 789056580
400897081 404455667
166989773 183667523
692630174 694825838
310102034 316456994
751894154 782003706
459963340 474771736
732009948 7404720...

output:

YES

result:

ok answer is YES

Test #39:

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

input:

200
561357296 715598106
296274404 375971342
92721528 602232032
306668663 831972035
84417270 924963678
352337756 536764416
762202186 973474202
125149332 250999672
206378519 761139563
618942087 999832479
496137333 737012503
124787299 244420669
169167620 791400150
416702102 481350092
7421702 424840482
...

output:

YES

result:

ok answer is YES

Test #40:

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

input:

200
254558382 424489478
687030232 756129594
449625152 853792238
618342402 913799492
513933852 572414810
349489875 962611747
176415864 297235930
321341748 831267468
588286232 604968650
583844190 729264200
749547069 963377635
736718181 802473651
300316615 591978363
292720073 374593381
88774964 8087826...

output:

YES

result:

ok answer is YES

Test #41:

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

input:

200
356682474 357558810
893944421 898416631
984928516 992854310
454151451 455314573
31142540 32421856
114923004 116910906
296026584 300904948
450088134 459377890
679872104 685494872
412097309 423741625
625413301 625850759
750350957 753912805
256952694 282551488
592983127 594293279
396104168 41379133...

output:

YES

result:

ok answer is YES

Test #42:

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

input:

200
930776484 948818354
701078055 722894499
627561529 631291285
17183342 24712408
987700791 992206793
65985368 85955260
571646471 578220923
24881725 43478261
377982661 383326403
751250965 755092437
989953792 993329408
778100545 784316129
61429870 73926160
701382959 711952621
343253862 350068618
9780...

output:

NO

result:

ok answer is NO

Test #43:

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

input:

200
143551730 569566010
714282845 960419453
181421774 869823640
177699125 365916341
211187347 329308789
908457897 942992517
351038898 380339200
487976202 524288834
328624357 855137415
322506759 631781271
515411282 689372088
753158017 773140737
511973557 557802047
148814846 402626864
557446701 821064...

output:

YES

result:

ok answer is YES

Test #44:

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

input:

200
731884212 735548836
361500211 377457819
875456294 882933536
155925059 163456025
528648009 530384519
560898877 585172519
817248844 820837600
902763435 904857161
113959024 114861578
404954488 425487402
691936183 701499493
377763090 398978556
404089362 404954488
497182580 521305706
519260679 537828...

output:

NO

result:

ok answer is NO

Test #45:

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

input:

200
489466683 490283297
465642499 470767775
515241267 525000785
988422798 991861540
56103102 63274364
22031085 29421343
783033385 806244373
249111505 255167081
285206119 285802725
314697541 319001007
373958691 427419539
870045288 873558378
470767775 477784237
78175631 99464041
846827206 868396958
49...

output:

NO

result:

ok answer is NO

Test #46:

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

input:

200
421992664 626842608
682700149 875087343
332700430 879864708
30600872 991845912
303729794 312185554
534891629 547183383
90264867 654571057
389259070 633841716
7701038 762217356
424639893 681920871
187051664 547975860
192044997 607540847
651820203 756064993
53125666 884971342
477372133 535079167
4...

output:

YES

result:

ok answer is YES

Test #47:

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

input:

200
608352383 616434149
25751446 29148520
152965295 157488559
562496769 574471187
974797914 993818538
359804977 374699749
224767762 260904134
187863665 222665865
778149498 786522604
288749842 289892562
890588741 911964697
124255019 132972253
957050613 965357257
489612368 492858458
610314286 61447224...

output:

NO

result:

ok answer is NO

Test #48:

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

input:

200
184769088 198822948
959004985 969909973
969909973 970156189
304406617 319457313
584575525 594572917
964402816 975663346
948754911 959146393
377266611 378030383
446208702 453137804
151257674 190506478
230935240 238225132
717911878 720874836
220407429 233870769
186219004 197373032
326273623 328848...

output:

YES

result:

ok answer is YES

Test #49:

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

input:

200
318247842 331174832
711682282 714642282
709147088 717177476
585009716 588584122
803884514 809435308
466091754 467342738
616841932 633802148
938574778 946018458
593657294 603658930
279937774 304945694
457488762 477196714
567945088 580071882
420172566 444594536
724452102 734291128
888432194 908072...

output:

YES

result:

ok answer is YES

Test #50:

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

input:

200
349197544 353198068
378384377 396148173
463941396 492773996
920767561 945407081
10956614 24511250
463249970 492662500
42900054 50728810
755371059 765896425
85767484 92530814
847104824 854087566
726863395 726950481
11385227 12267725
754547414 766720070
178383621 193320885
234528415 236097389
8110...

output:

NO

result:

ok answer is NO

Test #51:

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

input:

200
38308834 693926890
494289255 693406335
12803823 601139981
18401521 358264263
626518247 805139497
18843263 232200691
779677242 900982630
285592655 940503545
291262271 370876079
808111989 872596053
563450135 647000919
365466312 408261242
570657477 948217809
199945689 481792433
748723040 824545854
...

output:

YES

result:

ok answer is YES

Test #52:

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

input:

200
640367840 702834598
105766363 596245867
90568795 900177441
68915620 947864746
118494131 823308785
70280542 226712198
2898388 991663662
49223341 136367543
598412073 692738877
607997009 923379531
557733140 785079370
76061623 767820543
105387560 398173992
254126609 443925919
214264405 732292161
159...

output:

YES

result:

ok answer is YES

Test #53:

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

input:

200
452291857 460456555
189575718 219747230
260335108 262220428
155541712 168636238
957463448 970533314
197269471 216208917
581841246 608433922
56315853 68404339
503859412 509042824
658723707 667641439
990465048 991908074
527778065 558118063
428671906 444050348
311068782 315281196
54946643 57685063
...

output:

YES

result:

ok answer is YES

Test #54:

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

input:

200
376679657 381142277
988666577 992190787
928011136 950513810
518396573 520028599
1635754 15486586
94897010 102129782
503715789 504999255
78614471 81275663
956139098 970766272
50550052 60462644
866915819 869472265
676401096 677600304
288383987 290914903
100155902 124752394
668499756 677000700
6924...

output:

YES

result:

ok answer is YES

Test #55:

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

input:

200
278946768 312126018
718291570 730173556
858010989 867326421
162793404 168958970
893655501 898254145
428414431 433232655
119109841 130680699
408737962 410519796
461075379 474432033
877450988 892768374
560552057 566705861
812977942 816222712
500591454 517721896
516249808 519193984
194418198 195633...

output:

NO

result:

ok answer is NO

Test #56:

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

input:

200
489389905 495076373
243140859 268225917
496534897 497111571
763226850 765202914
298227460 305993446
496013952 497632516
454384720 462754006
940692585 943158559
16964504 37226158
837190996 841089694
712504421 716069381
366875409 373957081
207696603 227515475
125082560 157919534
677892906 67865841...

output:

YES

result:

ok answer is YES

Test #57:

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

input:

200
382719230 578207096
216148205 640573127
179408726 796401912
415369734 922763564
570832939 804328597
396730101 870695045
777964998 791098848
147388380 592091868
256865961 549486009
794721617 814470717
748335188 828332642
495813344 826842136
202941985 479902927
267130203 535346975
298108458 470739...

output:

YES

result:

ok answer is YES

Test #58:

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

input:

200
664618374 885611126
326710305 835208903
391861242 535147822
686766107 797882285
264999850 726976256
144020846 261671920
523501030 938391808
114784962 485023498
160111345 267614267
242015994 872913114
103453740 720054998
662278758 849919528
67553071 699850915
277153637 433049429
304718573 5605334...

output:

YES

result:

ok answer is YES

Test #59:

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

input:

200
23843409 620542283
505511407 940812095
292856136 562812194
555087455 769606713
229052868 763285946
74939589 415337579
239202355 973948773
538161612 870194122
603824894 880553928
66552482 230287334
161581565 933041007
68604228 707785126
75852506 281223922
698918592 935900122
739724128 960464678
7...

output:

YES

result:

ok answer is YES

Test #60:

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

input:

200
502650616 504492256
230498126 235165388
600823109 632206915
741364059 742948083
277351852 294528168
519537244 526647840
11195434 21684968
24240878 31243206
73628070 94937682
932588325 932628825
559117210 568891672
771297537 817486423
418244080 418788660
474798438 478487596
678391276 696820190
91...

output:

NO

result:

ok answer is NO

Test #61:

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

input:

200
145885257 148425673
154338739 167189229
20173570 20311080
733464495 772820201
92444309 100247719
1032345 14107133
351040637 359127519
81505055 92444309
652479289 667617391
68214584 77579218
798446038 813063092
766038215 767547859
98967761 102774687
400889247 401814305
66079215 79714587
343461372...

output:

NO

result:

ok answer is NO

Test #62:

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

input:

200
388259122 399283290
166753913 175350897
829585134 870788206
776678815 780195993
678622787 686291745
71638654 77920234
388186216 389458488
275132814 281015824
415657929 425537025
640070931 640216861
170182680 195397534
977702952 987615194
447261410 461264346
287267994 304163468
514248078 53757332...

output:

NO

result:

ok answer is NO

Test #63:

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

input:

200
229094643 331661063
45160345 850236053
561989513 846602701
461409230 860995262
153297316 494496022
379077688 383322628
112117697 907326775
124225503 444296351
503758312 998329412
212601873 365382303
133284851 164568155
568506565 604983523
128502285 886413925
21241621 552149369
382602077 65566718...

output:

YES

result:

ok answer is YES

Test #64:

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

input:

200
263234250 432069330
297863288 531607854
589625537 626989613
103523770 197793872
537332974 752927670
6814060 289531154
746103814 829016808
289288381 293409295
155355877 497538647
288503541 508464695
22308711 70321159
273238176 609917028
526637880 960577028
931932645 935113081
713156718 851065910
...

output:

YES

result:

ok answer is YES

Test #65:

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

input:

200
627889115 631870309
702630353 707385467
811692350 849653486
966250451 970127283
977778900 979023248
538521018 538569140
349947957 356787689
357513869 366322709
716346549 718693861
330145815 339593439
686016428 695320780
388637850 394261050
635399740 664460794
175410500 181647794
248742999 255069...

output:

NO

result:

ok answer is NO

Test #66:

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

input:

200
604414757 618694385
407923670 428950238
466437762 492937600
16528844 26445262
776725169 782536667
75823388 88367734
824520774 855266548
695759508 705679734
695475806 696184374
314577798 336488394
697575983 700719621
32978075 43221407
750632209 778536587
157892836 170186990
581777591 593788771
59...

output:

YES

result:

ok answer is YES

Test #67:

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

input:

200
62381150 77829208
769244844 772486842
378502338 383734254
613639533 619701735
380425423 397730625
819386682 826557220
423136826 432032938
348266959 353553149
465251370 489289288
452701669 464491547
135084069 161095387
925420631 926944553
638871288 658292054
974831560 979477788
121242553 13037872...

output:

NO

result:

ok answer is NO

Test #68:

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

input:

200
881055733 882918451
34132101 40645813
886866989 889156033
661749879 666529291
384806109 409236611
750694425 752014335
566875448 599855036
97428631 102389619
882918451 882989027
118439453 123299349
16045394 28188276
503612329 510329027
391032350 397021360
420426317 420520825
33798121 40979793
258...

output:

NO

result:

ok answer is NO

Test #69:

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

input:

200
264815171 278413373
200822640 228692448
442625851 473844737
870811874 872394634
556678817 571580737
894161248 903114420
227191042 230193854
423896503 441495197
157285352 187888586
927890669 931975291
342993006 366238232
861109037 873105713
624928923 643173507
644424607 651627299
853442553 858248...

output:

NO

result:

ok answer is NO

Test #70:

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

input:

200
254011748 257014316
140653408 160671038
25937879 29685635
438827072 453211692
627915054 628545914
215657005 218845783
143792381 178859113
56284836 64081032
334597198 346360742
974129682 977786412
108607444 113941614
293800001 300691797
863842397 865808063
110547432 111868790
466091810 502032948
...

output:

YES

result:

ok answer is YES

Test #71:

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

input:

200
546629759 558590193
786101293 818279217
951989906 955122014
426972760 444706974
897975511 901985175
142030267 144024543
784645619 786101293
951288393 955823527
221985654 228451764
726962414 744082408
746748043 760503155
25908131 29443835
459127462 464451596
474792999 475456517
36128050 40961928
...

output:

YES

result:

ok answer is YES

Test #72:

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

input:

200
35329343 214914209
277910685 736916385
245248102 329223330
699193952 941758874
551258729 652522243
126483211 891057155
70291712 567758130
60840153 916752879
161028655 707842917
317329169 626268235
501460030 638604900
424658397 983638891
318914011 374418059
149997383 251507697
33419076 443545468
...

output:

YES

result:

ok answer is YES

Test #73:

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

input:

200
275358959 290213575
953721266 962476096
779702925 786597831
932015474 951937700
705160412 747808372
111432732 122451354
551452906 554966700
34152762 34332714
502108247 516402979
494876601 503293853
329492792 338236604
252764546 257041680
240586594 259146298
375588630 375829702
388764730 39836863...

output:

YES

result:

ok answer is YES

Test #74:

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

input:

200
97232658 102337448
353425513 353880877
706057714 723459638
479295643 486449387
171822109 171826173
219717133 239065739
810487314 816353640
877761967 883305879
50624955 72707997
755857227 770600515
758343046 768114696
46444123 47956467
552539058 558805258
578073968 603658632
258719148 285447078
6...

output:

NO

result:

ok answer is NO

Test #75:

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

input:

200
4598499 16981161
272416301 327853799
187580570 988213656
329202851 333012889
103917215 604679999
247282123 708011307
81339283 141789941
331558042 980699250
139898201 425246817
323147864 372923850
18004746 989226664
96881960 952239074
423977813 548808043
44961194 283625994
107939350 990802164
160...

output:

YES

result:

ok answer is YES