QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#152749#4906. 球球zhouhuanyi90 316ms105116kbC++144.4kb2023-08-28 19:23:142023-08-28 19:23:14

Judging History

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

  • [2023-08-28 19:23:14]
  • 评测
  • 测评结果:90
  • 用时:316ms
  • 内存:105116kb
  • [2023-08-28 19:23:14]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<vector>
#include<set>
#include<unordered_map>
#define N 2000000
#define M 4194303
using namespace std;
const long long inf=(long long)(1e18);
const int INF=(int)(1e9);
char buf[N+1],*p1,*p2;
#define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,N,stdin),p1==p2)?0:*p1++)
int read()
{
    char c=0;
    int sum=0,f=1;
    while (c!='-'&&(c<'0'||c>'9')) c=gc();
    if (c=='-') c=gc(),f=-1;
    while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=gc();
    return sum*f;
}
void Adder(long long &x,long long d)
{
    x=(x<d)?x:d;
    return;
}
struct reads
{
    long long t,x;
};
reads st[N+1];
struct node
{
    int l,r,d;
    bool operator < (const node &t)const
	{
		return r<t.r;
	}
};
struct rds
{
    int num,data;
};
struct ed
{
	int num,data,nxt;
};
ed edge[M+1];
int n,len,L[N+1],lst[N+1],nt[N+1],head[M+1];
long long dp[N+1][2];
set<node>s;
vector<rds>v[N+1];
void adder(int l,int r,int d)
{
    if (l>r) return;
    node top;
    for (auto it=s.lower_bound((node){0,l});(*it).l<=r&&it!=s.end();it=s.lower_bound((node){0,l}))
    {
		top=(*it),s.erase(it);
		if (top.l<=l-1) s.insert((node){top.l,l-1,top.d});
		if (r+1<=top.r) s.insert((node){r+1,top.r,top.d});
    }
    s.insert((node){l,r,d});
    return;
}
int query(int x)
{
    auto it=s.lower_bound((node){0,x,0});
    return (*it).d;
}
void adder2(int x,int d)
{
	int ds=(x+INF)&M;
	for (int i=head[ds];i>0;i=edge[i].nxt)
		if (edge[i].num==x)
		{
			edge[i].data=max(edge[i].data,d);
			return;
		}
	edge[++len]=(ed){x,d,head[ds]},head[ds]=len;
	return;
}
int query2(int x)
{
	int ds=(x+INF)&M;
	for (int i=head[ds];i>0;i=edge[i].nxt)
		if (edge[i].num==x)
			return edge[i].data;
	return 0;
}
int main()
{
    long long d;
	int l,r,sl,sr,ps,ps2;
    n=read(),s.insert((node){-INF,INF,0});
    for (int i=1;i<=n;++i) st[i].t=read(),st[i].x=read(),L[i]=1;
    for (int i=0;i<=n;++i) dp[i][0]=dp[i][1]=inf;
    for (int i=1;i<=n;++i)
    {
		if (st[i].x==st[i-1].x) lst[i]=lst[i-1];
		else lst[i]=i-1;
    }
    nt[n+1]=n+1;
    for (int i=n;i>=1;--i)
    {
		if (st[i+1].x==st[i].x) nt[i]=nt[i+1];
		else nt[i]=i+1;
    }
    for (int i=2;i<=n;++i)
    {
		L[i]=max(max(L[i],query(st[i].x)),query2(st[i].x));
		if (lst[i-1]&&st[i-1].x!=st[i].x&&st[lst[i-1]].x!=st[i-1].x&&abs(st[i].x-st[lst[i-1]].x)>st[i].t-st[lst[i-1]].t) adder2(st[i-1].x,lst[i-1]+1);
		if (abs(st[i-1].x-st[i].x)>st[i].t-st[i-1].t) adder(-INF,min(st[i-1].x,st[i].x)-1,i),adder(min(st[i-1].x,st[i].x)+1,max(st[i-1].x,st[i].x)-1,i),adder(max(st[i-1].x,st[i].x)+1,INF,i);
    }
	for (int i=0;i<M;++i) head[i]=0;
    s.clear(),s.insert((node){-INF,INF,0}),dp[0][0]=0;
    for (int i=0;i<=n;++i)
    {
		for (int j=0;j<v[i].size();++j) adder2(v[i][j].num,v[i][j].data);
		if (dp[lst[i]][0]+abs(st[lst[i]].x-st[i].x)<=st[lst[i]+1].t) Adder(dp[i][0],max(dp[lst[i]][0]+abs(st[lst[i]].x-st[i].x),st[lst[i]].t));
		if (dp[lst[i]][1]+abs(st[lst[lst[i]]].x-st[i].x)<=st[lst[i]+1].t) Adder(dp[i][0],max(dp[lst[i]][1]+abs(st[lst[lst[i]]].x-st[i].x),st[lst[i]].t));
		if (max(query(st[i].x),query2(st[i].x))>=L[i]) dp[i][1]=st[lst[i]].t;
		//0
		if (i+1<=n)
		{
			ps=i+1,l=st[ps].x-(st[ps].t-st[i].t),r=st[ps].x+(st[ps].t-st[i].t);
			if (dp[i][0]+abs(st[i].x-st[ps].x)<=st[ps].t)
			{
				d=(st[ps].t-abs(st[i].x-st[ps].x)-dp[i][0])>>1,sl=max(min(st[i].x,st[ps].x)-d,(long long)(l)),sr=min(max(st[i].x,st[ps].x)+d,(long long)(r));
				if (sl<=sr)
				{
					if (st[ps].x<sl||st[ps].x>sr) adder(sl,sr,i+1);
					else adder(sl,st[ps].x-1,i+1),adder(st[ps].x+1,sr,i+1);
				}
			}
			if (dp[i][1]+abs(st[lst[i]].x-st[ps].x)<=st[ps].t)
			{
				d=(st[ps].t-abs(st[lst[i]].x-st[ps].x)-dp[i][1])>>1,sl=max(min(st[lst[i]].x,st[ps].x)-d,(long long)(l)),sr=min(max(st[lst[i]].x,st[ps].x)+d,(long long)(r));
				if (sl<=sr)
				{
					if (st[ps].x<sl||st[ps].x>sr) adder(sl,sr,i+1);
					else adder(sl,st[ps].x-1,i+1),adder(st[ps].x+1,sr,i+1);
				}
			}
		}
		//1
		if (nt[i+1]<=n)
		{
			ps=nt[i+1],ps2=i+1;
			if (dp[i][0]+abs(st[i].x-st[ps2].x)<=st[ps2].t&&max(dp[i][0]+abs(st[i].x-st[ps2].x),st[i].t)+abs(st[ps2].x-st[ps].x)<=st[ps].t) v[ps+1].push_back((rds){st[ps2].x,i+1});
			else if (dp[i][1]+abs(st[lst[i]].x-st[ps2].x)<=st[ps2].t&&max(dp[i][1]+abs(st[lst[i]].x-st[ps2].x),st[i].t)+abs(st[ps2].x-st[ps].x)<=st[ps].t) v[ps+1].push_back((rds){st[ps2].x,i+1});
		}
    }
    puts((dp[n][0]!=inf||dp[n][1]!=inf)?"YES":"NO");
    return 0;
}


詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 3ms
memory: 78540kb

input:

5
2 1
3 2
9 6
10 5
13 -1

output:

NO

result:

ok single line: 'NO'

Test #2:

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

input:

5
1 1
3 2
4 -1
6 4
10 -1

output:

NO

result:

ok single line: 'NO'

Test #3:

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

input:

4
16 13
18 4
20 3
21 5

output:

NO

result:

ok single line: 'NO'

Test #4:

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

input:

5
2 1
3 2
8 6
10 5
13 0

output:

YES

result:

ok single line: 'YES'

Test #5:

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

input:

5
2 1
3 2
9 6
10 5
13 0

output:

YES

result:

ok single line: 'YES'

Test #6:

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

input:

5
1 1
3 2
4 0
6 4
10 -1

output:

YES

result:

ok single line: 'YES'

Test #7:

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

input:

3
1 0
5 5
6 2

output:

YES

result:

ok single line: 'YES'

Test #8:

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

input:

5
2 1
6 0
7 -1
8 2
9 -2

output:

YES

result:

ok single line: 'YES'

Test #9:

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

input:

5
30 10
40 -10
51 9
52 8
53 20

output:

YES

result:

ok single line: 'YES'

Test #10:

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

input:

3
2 2
5 5
6 1

output:

YES

result:

ok single line: 'YES'

Subtask #2:

score: 5
Accepted

Dependency #1:

100%
Accepted

Test #11:

score: 5
Accepted
time: 14ms
memory: 79000kb

input:

100
51823 -51823
80072 -23574
152202 48556
263343 -14629
356859 -38607
441850 -193136
442857 -192129
471412 -108145
504392 -187704
582081 -265393
680615 -220684
775219 -261463
781624 -267868
801370 -287614
899570 -166859
982377 -272221
1048767 -338611
1094930 -189414
1170308 -460152
1222829 -512673
...

output:

YES

result:

ok single line: 'YES'

Test #12:

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

input:

100
106661 51112
155727 44629
204995 -4639
289968 -89612
352826 -26754
358628 -32556
456755 -130683
458435 -4437
484255 -103183
506353 -125281
537685 -93949
599460 -129003
697511 -32174
746550 -179264
749060 -176754
751112 -178806
756783 -173135
847195 -82723
886372 -43546
953837 23919
1050796 -7304...

output:

YES

result:

ok single line: 'YES'

Test #13:

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

input:

100
51953 51953
178909 4607
255989 -75003
303522 -152083
375771 -271865
422215 -318309
446399 -294125
534441 -382167
591666 -324942
665189 -398465
759160 -492436
856968 -394628
878236 -415896
978225 -199616
1004339 -342021
1011649 -349331
1056555 -304425
1121330 -315907
1124074 -242394
1192744 -3110...

output:

YES

result:

ok single line: 'YES'

Test #14:

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

input:

100
73696 -73696
130808 -16584
148097 -33873
159200 -31805
188326 -40840
268182 -69966
348208 89916
447670 9890
496101 38885
513498 56282
573623 -3843
583217 -13437
657874 61220
710362 -9546
801558 204904
803207 203255
815582 215630
821981 113708
825066 206146
833562 214642
916609 209231
985412 3664...

output:

YES

result:

ok single line: 'YES'

Test #15:

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

input:

100
66236 -66236
106931 -25541
163181 30709
203283 70811
234361 101889
307135 174663
327411 154387
341023 140775
473140 102431
484717 196204
524294 224204
612604 312514
669989 255129
767775 157343
803254 184627
824552 100566
889399 35719
968028 -42910
1006330 121864
1073474 -148356
1153800 -68030
12...

output:

YES

result:

ok single line: 'YES'

Test #16:

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

input:

100
82834 -82834
248482 -53442
338177 -150962
437708 -63278
483691 -17295
518642 -52246
567982 36253
649231 -101586
674192 -182835
765490 -249172
826825 -187837
855184 -157874
924507 -146873
948896 -122484
972376 -216196
978161 -99004
1048080 -104789
1147957 -274585
1160059 -262483
1184037 -286461
1...

output:

YES

result:

ok single line: 'YES'

Test #17:

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

input:

100
91929 91929
188131 188131
198025 154664
210890 165372
211317 165799
290526 245008
290567 178237
340724 295124
405545 244967
496543 268947
553096 212394
573058 232356
654081 313379
678974 338272
762176 421474
862069 359945
866678 316972
903067 321581
980960 358476
1012412 280583
1032656 306780
10...

output:

YES

result:

ok single line: 'YES'

Test #18:

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

input:

100
4483 4483
89756 89756
213487 -33975
259610 5989
280159 -100647
353529 -174017
367495 -160051
417893 -80098
506283 -21263
543352 -58332
550427 -109653
631669 15835
656725 -65407
664733 -1213
728813 62867
782181 9499
868600 95918
958063 6455
1015984 -9221
1059787 64376
1104762 20573
1163127 -24402...

output:

YES

result:

ok single line: 'YES'

Test #19:

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

input:

100
34147 -34147
125881 -345
202224 57587
295718 40436
346068 90786
402776 34078
468919 133930
528960 40180
617215 -48075
665464 100221
738036 72746
769757 174
783894 55162
864594 -25538
938947 48815
1005807 115675
1070941 50541
1147275 41025
1230377 43773
1324332 137728
1401300 214696
1430687 18530...

output:

YES

result:

ok single line: 'YES'

Test #20:

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

input:

100
77792 -77792
169295 13711
305132 -55629
399497 105233
434076 10868
494655 131233
588394 70654
673278 309856
761111 397689
768489 390311
814988 343812
877420 406244
931377 460201
981245 410333
1041309 470397
1046667 465039
1062707 448999
1065990 452282
1068470 454762
1079487 443745
1174576 538834...

output:

YES

result:

ok single line: 'YES'

Test #21:

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

input:

100
53894 53894
135442 135442
200367 110566
243624 193872
332119 282367
340178 274308
385363 150615
399225 305631
476516 228340
540645 292469
570313 322137
593223 299227
651531 357535
668057 319493
727163 341009
759414 400115
832493 359287
918275 432366
961384 273505
1021849 290861
1031313 230396
11...

output:

YES

result:

ok single line: 'YES'

Test #22:

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

input:

100
52893 -52893
101814 -3972
239224 -87898
265563 -141382
266345 -114261
313693 -115043
394360 13754
493999 -85885
497056 -82828
575421 -66913
628962 -58004
725367 38401
757850 -4463
803225 116259
894789 24695
964839 70884
1044708 34514
1127864 -45355
1131503 117670
1170887 81925
1246292 6520
13038...

output:

YES

result:

ok single line: 'YES'

Test #23:

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

input:

100
121036 47104
155723 155723
208299 103147
225499 120347
321564 216412
415194 121036
458597 310042
492954 300996
575691 383733
632527 326897
647556 266639
672666 336978
701097 311868
723032 365409
737937 402249
802710 337476
869271 270915
939270 387344
987072 388716
1070505 340914
1076499 299289
1...

output:

YES

result:

ok single line: 'YES'

Test #24:

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

input:

100
19066 -19066
79299 41167
248978 -128512
341368 -38641
415112 -147158
486846 -75424
509843 -98421
597101 -220902
605342 -193920
660614 -249192
695083 -214723
778077 -131729
789682 -143334
851784 -205436
892446 -246098
928768 -185679
937603 -200941
999196 -262534
1030177 -209776
1055175 -256551
10...

output:

YES

result:

ok single line: 'YES'

Test #25:

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

input:

100
104982 -104982
194273 -15691
231648 21684
253273 43309
277325 19257
351385 93317
386548 128480
411038 -42838
478035 170987
500232 103990
520396 213348
562937 255889
592884 193184
643292 235428
659690 251826
659920 252056
669036 261172
683945 285836
767694 330012
863454 425772
936414 246263
10076...

output:

YES

result:

ok single line: 'YES'

Test #26:

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

input:

100
70425 70425
165404 165404
229545 101263
297118 137503
366451 106170
438717 -35429
441973 -32173
457797 -16349
480072 -38624
534875 -93427
612510 -15792
667662 36837
722947 39360
802272 -15925
890279 -95250
892397 -9361
955792 -7243
987819 86061
1040030 54034
1125407 52895
1217142 138272
1255132 ...

output:

YES

result:

ok single line: 'YES'

Test #27:

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

input:

100
76981 -76981
232876 -20663
320578 -32538
403941 -120240
496213 -41447
544550 50825
581113 6890
632861 -29673
649124 -65158
668174 -46108
681614 -32668
737144 -88198
780617 -81421
790720 -121568
837225 -168073
891831 -131671
900080 -214430
930505 -244855
1018493 -156867
1027988 -147372
1066446 -2...

output:

YES

result:

ok single line: 'YES'

Test #28:

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

input:

100
89389 89389
156281 22497
253884 -75106
285205 -106427
298414 -93218
313370 -108174
317620 -103924
350775 -137079
384826 -171130
394525 -161431
430874 -197780
556699 -323605
639587 -406493
655824 -236376
745520 -390256
814508 -410964
875056 -479952
890537 -350416
941713 -365897
997165 -417073
100...

output:

YES

result:

ok single line: 'YES'

Test #29:

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

input:

100
7156 7156
17981 17981
37569 37569
81723 -6585
148928 -73790
221418 -146280
232512 -157374
253493 -178355
361677 -183493
452238 -92932
511438 -235016
547990 -33732
549824 -72118
634727 -70284
710903 -80845
712665 -82607
715401 -157021
741330 -79871
839580 -105800
851693 -7550
893356 4563
969429 -...

output:

YES

result:

ok single line: 'YES'

Test #30:

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

input:

100
117840 28138
121673 -44851
193649 31971
202192 -48548
282175 -40005
353758 31435
368466 -54856
425105 -111495
463845 -40148
500723 -72755
541362 -76516
616939 -939
675610 57732
722724 -35877
818288 9282
891988 104846
922726 52244
967074 7896
1005889 82982
1061986 -30919
1160798 -87016
1209727 -3...

output:

YES

result:

ok single line: 'YES'

Test #31:

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

input:

100
60626 -60581
189954 -16462
239972 18774
253088 31890
300065 68792
322319 101121
394044 78867
464501 102389
469695 172846
534746 107548
587048 42462
682042 85218
697245 70079
724345 -9840
787448 106082
791861 101638
818610 42979
844082 74920
876263 100392
919306 25168
982324 68130
1042374 88119
1...

output:

NO

result:

ok single line: 'NO'

Test #32:

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

input:

100
143896 59539
196448 -77370
262369 -11449
309198 -24818
389887 -138967
430809 -58278
503227 -107372
567472 -179889
664983 -73983
728052 -171506
744097 -26959
749079 -10914
756094 -31941
781205 -38956
837136 -7958
909582 64488
972925 -63978
1026327 181233
1073250 134216
1094877 112683
1128899 1278...

output:

NO

result:

ok single line: 'NO'

Test #33:

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

input:

100
72050 -72050
127608 -127608
202541 -202453
216059 -188860
261290 -234104
348746 -146648
439553 -55841
527555 32161
536499 23217
541577 18139
586908 63470
679903 86423
728808 156465
772705 151457
790315 169067
793195 171947
824063 107560
834039 192910
863364 163535
870619 156259
945063 202815
960...

output:

NO

result:

ok single line: 'NO'

Test #34:

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

input:

100
25278 25236
82501 82501
173431 173431
342557 166735
372056 85520
458605 196234
500099 241289
530642 271832
544930 257544
618713 183761
682587 247697
744199 186147
766751 282783
771583 213531
811351 173763
883412 208699
959549 177839
1045507 91826
1054653 82735
1138204 -816
1142151 101702
1211261...

output:

NO

result:

ok single line: 'NO'

Test #35:

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

input:

100
81237 -81237
165513 -165525
312929 -248023
364458 -312929
447621 -364458
540011 -540011
615683 -615683
680497 -550869
762908 -468458
783808 -489384
811564 -447621
871195 -521285
956657 -461654
969938 -620028
1069526 -606747
1122939 -719616
1137292 -773029
1216670 -787382
1280958 -802472
1313812 ...

output:

NO

result:

ok single line: 'NO'

Test #36:

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

input:

100
88417 88417
181603 181603
236012 127260
261251 104062
311990 152694
321638 143046
364855 186263
463672 285017
508105 240521
542835 101955
612127 344543
674045 406461
733105 347401
812039 268467
833318 289746
898811 224253
908907 234349
955450 275251
1000461 235881
1055195 290615
1107632 343052
1...

output:

NO

result:

ok single line: 'NO'

Test #37:

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

input:

100
7576 7576
76331 76331
144039 72116
238831 230401
261988 253558
262970 252576
300034 215512
385071 135609
420780 166184
520199 265633
582699 130475
583490 202372
651208 203163
734107 352989
740309 346787
760610 326486
844818 242278
943827 341287
1015483 269631
1063389 317537
1157285 223641
120201...

output:

NO

result:

ok single line: 'NO'

Test #38:

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

input:

100
117196 -90464
168952 -65440
178446 -117196
191337 -62043
282253 28873
373845 -74934
414411 79899
424118 70154
442379 51837
471965 22345
504400 -10090
512991 -18681
534448 120465
593071 61399
598589 55881
631792 22678
718884 -64414
781778 2776
867222 -127308
922564 -212752
986075 -93899
1020476 -...

output:

NO

result:

ok single line: 'NO'

Test #39:

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

input:

100
105005 -105005
127165 -82845
142373 -98053
236681 -3745
326967 86541
420336 -6828
427836 -14328
469267 -84292
483033 -41993
562393 -121353
657751 -216711
684166 -55759
745007 -251137
820570 -175574
878248 -233290
920766 -275770
947236 -249300
1016460 -190296
1096727 -238257
1169851 -165133
12238...

output:

NO

result:

ok single line: 'NO'

Test #40:

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

input:

100
85627 -85627
183533 -73295
269408 -159170
302102 -128414
348422 -126476
376729 -51849
474226 45648
506859 78291
518899 90321
527097 82123
549973 59339
589178 98636
622505 -80156
650410 65309
670319 73305
736888 139874
780741 96021
820862 136142
916107 93214
917835 42571
996477 40870
1095409 1212...

output:

NO

result:

ok single line: 'NO'

Test #41:

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

input:

100
81701 81701
215706 150496
235932 235932
305676 305676
336471 274881
356610 295020
439447 377922
482081 335353
544313 397585
564029 215706
574481 417301
667946 334230
761311 427595
856658 332248
916653 392243
961904 437494
970348 429050
978735 420663
991385 427724
1064503 360195
1092058 387750
11...

output:

NO

result:

ok single line: 'NO'

Test #42:

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

input:

100
82914 -82914
191148 25320
261812 -41465
298359 -45344
309574 -8797
358786 2418
390932 83776
472983 165827
551804 244648
558028 51630
579898 260294
584947 265343
643094 323490
699057 379453
747334 427730
781693 462089
853539 390243
948355 485059
991670 238424
1069127 528374
1144629 605831
1150135...

output:

NO

result:

ok single line: 'NO'

Test #43:

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

input:

100
54782 54782
72506 37058
191254 78971
244954 55836
321211 2136
416923 -116133
459576 -73567
525832 -20421
598863 -139910
683709 -297787
736751 -350829
833343 -254237
890201 -197379
978719 -285897
998262 -266354
1001352 -263264
1005257 -212941
1073171 -267169
1162840 -245414
1178296 -229958
125246...

output:

NO

result:

ok single line: 'NO'

Test #44:

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

input:

100
50514 50520
193479 134177
259987 141383
305971 95399
346593 54777
423357 -21987
515309 74875
520708 69965
556641 100499
592502 136360
600988 127874
689704 216590
701278 64566
779273 204925
785519 120775
856648 191904
869158 204414
891259 182313
977019 127021
994311 285365
1041602 238074
1124858 ...

output:

NO

result:

ok single line: 'NO'

Test #45:

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

input:

100
59401 -59401
95168 -23634
156601 37799
198986 4767
269590 74
335981 -132195
378074 -65804
397451 -154980
489994 -62368
546068 -6294
591244 -51470
673127 -174288
771083 -231309
860091 -320317
911765 -268643
988563 -191845
1031966 -133353
1129661 -137553
1154462 -235248
1228195 -162354
1228341 -23...

output:

NO

result:

ok single line: 'NO'

Test #46:

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

input:

100
68962 68962
131826 131826
153032 153032
306627 306627
389165 224089
476933 241628
564240 224550
590873 311857
603058 238998
629173 251183
713223 181063
722301 171985
757925 136361
781141 159577
833005 265113
840352 107713
896126 59286
993301 -37889
1017888 -13302
1083243 -78657
1170957 9057
1187...

output:

NO

result:

ok single line: 'NO'

Test #47:

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

input:

100
35441 35441
53627 17226
116533 25219
212874 121560
238323 -10216
254397 130935
295739 89593
314444 108298
395848 189702
423709 217563
434888 147009
475446 246942
550224 172164
625587 206384
704392 247527
776267 168722
806419 96847
900766 -27652
939314 10896
985565 57147
1023155 66695
1048452 947...

output:

YES

result:

ok single line: 'YES'

Test #48:

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

input:

100
52338 -52338
114539 9863
207208 -82806
250530 -75420
326991 -151881
389532 -100774
446444 -271334
525780 -350670
593758 -282692
690111 -379045
749652 -319504
783290 -214353
815950 -253206
843036 -226120
919279 -302281
981205 -285866
1040862 -364289
1110697 -374467
1203281 -304632
1273864 -467051...

output:

NO

result:

ok single line: 'NO'

Test #49:

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

input:

100
48687 48687
166569 -69269
186604 -89230
280547 -183173
289599 -192225
351546 -130278
394768 -173500
439049 -217781
500346 -279078
536497 25932
595838 -302268
605732 -312162
613144 -319574
675774 -256944
745687 -187031
770021 -211365
851261 -242927
927122 -368466
955541 -292605
1005029 -389535
10...

output:

NO

result:

ok single line: 'NO'

Test #50:

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

input:

100
11296 -11296
39104 -39104
71206 -7002
120841 -56637
208300 -35825
255609 -55163
328806 -128360
388414 -68752
450880 -102472
501252 -181590
511131 -131218
512359 -190241
563241 -241123
567121 -191469
640848 -163516
668714 -191382
739980 -262648
796285 -237243
893903 -416571
949104 -318953
1032640...

output:

NO

result:

ok single line: 'NO'

Subtask #3:

score: 10
Accepted

Dependency #2:

100%
Accepted

Test #51:

score: 10
Accepted
time: 10ms
memory: 76988kb

input:

5000
89276 25828
169878 -54774
248197 23545
277791 -6049
376036 92196
411164 127324
434915 151075
479167 106823
550715 -31724
554339 38899
629511 -36273
710530 -117292
798775 35275
837137 -205537
848688 -232348
934523 -318183
946620 -243899
1006976 -245730
1068431 -306086
1106403 -184275
1141056 -18...

output:

NO

result:

ok single line: 'NO'

Test #52:

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

input:

5000
127640 -41828
224827 -139015
245457 -159645
272350 -132752
301722 -103380
395251 -84734
449871 44769
499969 94867
507388 102286
541881 -9851
596399 67793
656458 13275
689594 73334
743406 94010
792874 143478
869735 66617
963123 160005
1022846 100282
1113125 190561
1125858 177828
1225221 78465
13...

output:

NO

result:

ok single line: 'NO'

Test #53:

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

input:

5000
98784 -98784
175485 -22083
244980 -92037
273992 -120590
334224 -180822
359753 -155293
377887 -137159
397849 -91578
450251 -104719
502698 -52272
597924 -157121
654335 42954
753847 198877
806616 146108
897440 236932
916803 99365
969822 256295
1022264 203276
1028400 144698
1063279 109819
1086098 1...

output:

NO

result:

ok single line: 'NO'

Test #54:

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

input:

5000
22184 22184
118022 -73654
234358 -189990
240977 -183371
286208 -228602
346972 -289366
415029 -113126
493933 -357423
496630 -436327
577210 -439024
605934 -329720
619155 -342941
636878 -325218
710934 -251162
802010 -342238
839076 -379304
850339 -390567
875776 -416004
905567 -358444
919199 -372581...

output:

NO

result:

ok single line: 'NO'

Test #55:

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

input:

5000
65305 65305
90798 90798
100225 100225
163381 37069
255973 -55523
267582 -43914
347820 -42211
414430 -187356
494354 -107432
517631 -120746
562151 -84155
653488 -130972
668855 -115605
747580 -39635
833872 -194330
875633 -322383
918554 -280622
947457 -279462
1043447 -404355
1094676 -308365
1154429...

output:

NO

result:

ok single line: 'NO'

Test #56:

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

input:

5000
60392 -60392
132615 -48947
206669 -109725
289571 -183779
354965 -166271
384791 -196097
414393 -166495
452147 -204249
470914 -100877
511712 -223016
611102 -263814
648665 -126861
672308 -164424
688965 -167161
700001 -156125
780729 -150504
860470 -316594
933421 -389545
966468 -356498
986036 -37606...

output:

NO

result:

ok single line: 'NO'

Test #57:

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

input:

5000
7179 -7179
155828 141470
232890 64408
270729 43069
317318 26569
373403 -76105
438884 -10624
510292 60784
580818 -9742
667072 -20020
703847 -59221
761407 -95996
800320 -1661
812644 49576
897680 37252
922140 -59920
950068 -87848
953424 -84492
1031668 -162736
1115588 -246656
1177683 -308751
119429...

output:

NO

result:

ok single line: 'NO'

Test #58:

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

input:

5000
1797 -1797
79140 18243
97961 56725
166643 75546
229510 50910
328223 149623
394754 83092
410524 -11957
421635 98862
518570 109973
537757 226095
548327 236665
594924 283262
638716 206908
659371 260125
700394 219102
714337 239470
768283 205159
864055 354877
939450 430272
1019044 509866
1114620 414...

output:

NO

result:

ok single line: 'NO'

Test #59:

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

input:

5000
2979 -2979
44160 38202
125631 -43269
187525 -105163
256130 -173768
351617 -78281
437610 7712
451577 21679
465208 35310
466542 36644
499038 69140
551500 121602
729702 -56600
763482 -22820
842700 56398
896397 25188
946590 2701
1023684 29602
1045156 8130
1141169 104143
1224421 -47492
1254648 18739...

output:

NO

result:

ok single line: 'NO'

Test #60:

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

input:

5000
62935 -62935
114334 -42708
170565 -11536
196066 -67767
277598 39266
309808 71476
375912 -42266
402298 111194
462230 51262
482101 71133
548155 137187
609309 198341
676116 265148
729531 137580
791034 257060
849333 315359
913152 379178
986853 452879
1030842 318563
1110753 496868
1123093 416957
116...

output:

NO

result:

ok single line: 'NO'

Test #61:

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

input:

5000
1669 -1669
172889 -172889
215931 -80059
286700 -59078
354587 -126965
436511 -208889
444215 -201185
471115 -174285
565101 -129847
650895 -268271
693244 -182477
756508 -288090
798928 -224826
865805 -245670
953747 -178793
1052418 -189522
1094896 -90851
1120168 -172316
1179756 -147044
1252509 -1854...

output:

NO

result:

ok single line: 'NO'

Test #62:

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

input:

5000
40351 40351
51521 51521
207129 -104087
287432 -39864
334656 -231614
411526 -184390
444846 -154744
479782 -223000
564625 -188064
660627 -211841
681750 -232964
726428 -307843
778539 -225531
795118 -242110
823157 -277642
863458 -254372
941189 -332103
1026633 -246659
1040118 -233174
1095780 -214071...

output:

NO

result:

ok single line: 'NO'

Test #63:

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

input:

5000
51762 51762
75584 54590
151256 65087
234162 61824
304995 -9009
360823 -64837
442971 17311
541654 -21082
629463 6437
692003 68977
753505 -81372
801454 82530
815282 130479
829771 54213
875545 68702
941189 8439
1010892 74083
1041078 113600
1094107 60571
1134377 20301
1170766 143786
1176771 50685
1...

output:

NO

result:

ok single line: 'NO'

Test #64:

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

input:

5000
114034 81813
123648 39978
212131 128461
225011 141341
236775 129577
294918 49592
354304 128334
371654 187720
430392 86946
464627 145684
543818 200372
549706 121181
562993 181197
645188 263392
704959 323163
801030 419234
900351 194484
951209 269055
965284 319913
1000477 318323
1036713 282087
110...

output:

NO

result:

ok single line: 'NO'

Test #65:

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

input:

5000
95304 -95304
103842 -103842
234183 26499
246691 -35833
301096 68396
336404 13991
376760 -7268
449733 -80241
461392 -68582
462735 33088
532590 -137094
621554 -226058
666489 -67239
694766 -181123
789550 -247630
833964 -152846
864496 -292044
867851 -319221
886256 -300816
945203 -322576
1037681 -45...

output:

NO

result:

ok single line: 'NO'

Test #66:

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

input:

5000
77504 77504
129429 25579
179710 75860
222448 33122
291723 102397
371522 182196
493571 304245
541879 255937
626334 171482
698386 99430
734744 63072
801071 -3255
809290 4964
870686 -56432
941662 14544
955028 213913
1033592 106474
1092714 165596
1123268 196150
1193433 27910
1247326 266315
1320650 ...

output:

NO

result:

ok single line: 'NO'

Test #67:

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

input:

5000
82942 82942
149384 149384
238307 60461
277027 99181
309827 66381
355036 111590
404639 161193
457640 214194
484048 187786
572420 99414
621847 49987
708163 136303
801457 43009
838684 5782
898054 -53588
903554 -59088
954335 -109869
1041610 -22594
1061333 -42317
1118265 -99249
1200357 -17157
120813...

output:

NO

result:

ok single line: 'NO'

Test #68:

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

input:

5000
21901 21901
177438 41766
252707 -45935
265698 117035
315884 79840
324730 88686
395404 18012
416230 -2814
445804 26760
476018 130026
498162 -3454
577368 18690
643439 5555
733276 95392
821435 7233
824569 -60516
892229 10367
956964 78027
1002486 13292
1015822 -45566
1109020 47632
1207824 -51172
12...

output:

NO

result:

ok single line: 'NO'

Test #69:

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

input:

5000
4969 541
84968 80540
175035 170607
199440 195012
243457 2755
258631 239029
274698 239922
315407 280631
377993 218045
425728 170310
429458 223855
445417 182539
506252 121704
580492 166580
664354 47464
737319 58361
818792 -23112
864824 -69144
931483 -2485
1025193 -96195
1080795 -151797
1126323 13...

output:

NO

result:

ok single line: 'NO'

Test #70:

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

input:

5000
22504 22504
118440 19689
152023 -107015
215378 -43660
282414 -73432
375763 -17347
394467 1357
411850 18740
480589 -110696
556063 25475
604787 -49999
633445 -51907
637947 -47405
686406 1054
688122 -662
688123 -661
780681 91897
834139 -23249
837162 38439
916245 -43667
998488 38576
1095010 -57946
...

output:

NO

result:

ok single line: 'NO'

Test #71:

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

input:

5000
120153 10569
157008 65361
168403 47424
222777 58819
295913 40057
297404 38566
343183 -7213
359764 9368
424776 74380
447819 113193
516197 29045
556104 -10862
590821 -45579
604966 97423
682963 46563
730356 93956
805613 169213
862633 -31434
937157 37669
938397 112193
988401 36429
1029989 -13575
11...

output:

YES

result:

ok single line: 'YES'

Test #72:

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

input:

5000
50144 50144
123528 -23240
200505 53737
258339 -4097
310053 -55811
316243 -62001
379416 1172
411704 -31116
422053 -20767
507701 -106415
615488 -59976
641191 1372
682616 -14350
699741 -31475
741513 27075
805595 -73247
832240 -9165
928404 -35810
937452 69402
952418 84368
1050127 -13341
1138545 -10...

output:

YES

result:

ok single line: 'YES'

Test #73:

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

input:

5000
55285 38189
110445 93349
178892 -8548
239858 -36064
323755 24902
360156 84234
389301 113379
421589 145667
509389 47833
583572 233467
666443 76413
738704 159284
827398 4152
838815 -95959
891247 -84542
971810 -124090
1035356 -43527
1079601 -187636
1093415 -157205
1191053 -254843
1226035 -219861
1...

output:

YES

result:

ok single line: 'YES'

Test #74:

score: 0
Accepted
time: 17ms
memory: 77984kb

input:

5000
61332 -61332
221671 -221671
284469 -284469
322652 -322652
396304 -145333
419772 -225532
503883 -309643
512607 -300919
535001 -278525
605084 -208442
648508 -251866
710996 -249000
773213 -251595
802350 -189378
857835 -280732
912616 -280028
989267 -225247
1042437 -409849
1073323 -356679
1097186 -4...

output:

YES

result:

ok single line: 'YES'

Test #75:

score: 0
Accepted
time: 19ms
memory: 77700kb

input:

5000
32144 32144
161492 70850
163722 73080
234264 143622
239467 116171
285900 91986
295146 138419
372588 82740
459210 73560
485339 47431
553264 160182
616374 -83604
629928 -70050
660607 -100729
716472 -44864
774040 -102432
790362 -118754
824239 -84877
863572 -45544
885250 -67222
925039 -20494
101789...

output:

YES

result:

ok single line: 'YES'

Test #76:

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

input:

5000
78922 -78922
165059 -165059
193539 -193539
229846 -229846
298345 -252915
333169 -287739
346603 -274305
388968 -275630
466967 -231940
512321 -355293
607831 -309939
657083 -500055
714353 -450803
784478 -512910
827055 -555487
921965 -460577
997378 -442785
1064485 -468883
1145978 -535990
1203542 -5...

output:

YES

result:

ok single line: 'YES'

Test #77:

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

input:

5000
36150 36150
137369 -65069
179531 -31945
212813 -56189
214308 -57684
261665 -105041
330900 -22907
346198 -35806
429537 32235
517623 -55851
607943 34469
696856 -51104
705839 132365
778734 123382
792892 191102
858872 257082
922944 205260
937851 178103
1033862 193010
1033993 273983
1126594 366584
1...

output:

YES

result:

ok single line: 'YES'

Test #78:

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

input:

5000
54802 -54802
126027 16423
175573 -33123
289259 -73315
369234 -79796
397857 179
458820 9790
486662 -51173
563654 -39360
603545 531
606867 -2791
620194 10536
686640 76982
785436 -21814
881750 74500
945266 10984
1042943 -86693
1128127 -171877
1219872 -80132
1235724 37632
1291491 -95984
1360257 -82...

output:

YES

result:

ok single line: 'YES'

Test #79:

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

input:

5000
46349 46349
49025 49025
74605 74605
238604 51852
325958 -35502
334951 -18771
346770 -56314
365868 -37216
387547 -15537
387917 -15167
391645 -11439
411110 8026
411343 8259
416048 12964
429368 -356
462891 -44495
503190 33167
526330 -30272
561335 -65277
606915 -110857
675605 -42167
709773 -76335
7...

output:

YES

result:

ok single line: 'YES'

Test #80:

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

input:

5000
118310 -36786
120449 -38925
125083 -77548
186841 27467
193327 20981
224205 51859
227872 55526
234829 48569
308855 122595
340006 91444
416420 -34291
470747 15030
504028 -39297
539682 -108232
587037 -155587
597623 -145001
666774 -214152
692399 -239777
770062 -162114
826780 -218832
869827 -175785
...

output:

YES

result:

ok single line: 'YES'

Test #81:

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

input:

5000
170828 2184
224802 86506
310128 141484
398458 56158
481563 136259
518515 99307
564155 53667
638929 53154
722376 -104554
740746 -86184
772551 -54379
800005 -26925
896529 69599
912579 85649
974188 147258
1041243 214313
1072804 182752
1135402 245350
1150863 229889
1189786 268812
1262708 195890
128...

output:

YES

result:

ok single line: 'YES'

Test #82:

score: 0
Accepted
time: 19ms
memory: 77152kb

input:

5000
125758 125758
199481 52035
232287 84841
294689 30031
302416 14712
305615 17911
320413 3113
335721 18421
421942 -67800
483637 -6105
529097 22439
602665 -51565
650251 -77547
724736 -125133
785738 -64064
866965 17163
955957 -71829
980395 -3062
981586 -95076
1049959 -26703
1141052 64390
1222429 -16...

output:

YES

result:

ok single line: 'YES'

Test #83:

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

input:

5000
47288 47288
142346 -35593
196455 30693
245384 -23416
328029 64409
410335 146715
419761 -18236
513225 156141
542048 33854
562359 62677
653534 54165
719596 211402
766484 145340
823333 258290
910532 114242
946566 201441
1001528 95314
1026685 70157
1048456 150276
1108007 48386
1122059 121989
121814...

output:

YES

result:

ok single line: 'YES'

Test #84:

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

input:

5000
17170 -17170
105095 70755
197171 162831
283896 146762
289616 152482
312201 129897
366424 111434
401458 219154
436303 184309
535867 283873
634151 382157
708740 456746
797826 545832
843825 499833
940045 403613
973424 370234
991039 184120
1002349 352619
1089511 428471
1131930 470890
1174300 513260...

output:

YES

result:

ok single line: 'YES'

Test #85:

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

input:

5000
183177 -183177
236064 -236064
290147 -95369
378307 -201987
394859 -290147
419674 -210250
476490 -267066
535644 -207912
630879 -303147
670723 -342991
754773 -258941
791152 -185435
803135 -234545
897211 -140469
984578 -222562
1008396 -204018
1102313 -297935
1119350 -227836
1160883 -356505
1242578...

output:

YES

result:

ok single line: 'YES'

Test #86:

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

input:

5000
45393 45393
68996 68996
148533 148533
234790 62276
274528 22538
293752 41762
410338 29864
497749 -57547
576277 -22480
666893 -136075
675313 -235111
732013 -291811
742401 -226691
772355 -281423
823908 -362930
824660 -363682
891231 -311377
935877 -341757
942742 -297111
1007785 -413665
1106936 -31...

output:

YES

result:

ok single line: 'YES'

Test #87:

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

input:

5000
72149 -72149
128610 -28261
225281 -15688
230570 -117648
250344 -112359
322669 -170199
340207 -97874
358026 -152661
407128 -85740
466214 -134842
522466 -88574
564283 -130391
585762 -108912
663459 -31215
728753 -96509
785205 -40057
814975 -144826
898716 73454
941776 -10287
951513 106777
953718 10...

output:

YES

result:

ok single line: 'YES'

Test #88:

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

input:

5000
46911 46911
49956 49956
141652 -41740
227582 44190
243520 28252
341415 126147
360446 112050
372650 145178
439666 132974
453023 79315
511158 65958
523403 8935
596388 21180
689880 -64050
751059 -31737
844024 29442
846311 -126989
927085 -46215
937075 -36225
977368 -124702
1069213 95913
1110449 546...

output:

YES

result:

ok single line: 'YES'

Test #89:

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

input:

5000
53397 53397
129304 -22510
210837 -20959
215349 59023
259130 10730
356555 54511
376746 -86695
457167 -66504
527925 -56841
620556 13917
647094 -122934
722399 -198239
780726 -149472
861077 -220263
862184 -221370
930348 -153206
993639 -139912
996693 -213443
1001996 -216497
1087210 -293354
1179103 -...

output:

YES

result:

ok single line: 'YES'

Test #90:

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

input:

5000
127236 -3214
205335 -65225
215846 -70802
233844 -52804
315468 -134428
345981 -81313
424382 -25514
513515 63619
518036 -103915
579744 129848
580587 129005
594820 68140
603257 151675
627664 143238
667458 215876
676029 176082
696960 207305
789596 93738
846857 186374
904909 -21575
956559 30075
1033...

output:

YES

result:

ok single line: 'YES'

Subtask #4:

score: 20
Accepted

Test #91:

score: 20
Accepted
time: 13ms
memory: 79324kb

input:

5000
6 6
80 80
170 48
240 106
243 179
329 176
412 93
485 176
552 249
555 316
613 371
650 313
733 251
735 253
736 334
815 254
893 333
943 255
965 227
1022 284
1116 205
1174 320
1230 376
1318 378
1336 288
1430 212
1494 276
1562 344
1597 309
1638 350
1716 272
1793 349
1809 365
1908 306
1951 464
2037 42...

output:

YES

result:

ok single line: 'YES'

Test #92:

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

input:

5000
64 -64
146 -46
177 -14
249 -5
327 -77
370 -83
438 -194
463 -219
554 -126
625 -199
689 -128
774 -50
854 -135
882 2
916 30
936 -12
1022 -98
1071 -32
1157 -49
1195 75
1206 37
1221 86
1227 77
1251 71
1269 101
1324 83
1373 28
1426 77
1439 24
1454 11
1508 -4
1601 35
1619 -58
1668 17
1719 -32
1775 -37...

output:

YES

result:

ok single line: 'YES'

Test #93:

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

input:

5000
136 32
137 31
188 82
248 142
266 -52
277 124
327 135
370 185
445 153
506 228
536 214
586 194
652 128
685 244
778 95
812 2
884 108
917 141
984 36
989 208
1012 190
1042 213
1078 220
1139 184
1204 245
1205 311
1208 310
1282 382
1363 463
1383 308
1449 443
1470 530
1531 509
1560 591
1588 620
1623 55...

output:

YES

result:

ok single line: 'YES'

Test #94:

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

input:

5000
17 17
116 -44
157 -3
224 -63
279 64
320 119
328 78
365 33
367 35
447 70
473 89
554 115
602 122
664 184
683 170
689 159
760 165
763 85
788 88
793 60
795 65
854 8
855 9
910 -46
911 -45
995 39
1070 -36
1147 41
1191 -3
1284 67
1367 -179
1419 -127
1442 -96
1475 -104
1480 -142
1575 -237
1657 -155
167...

output:

YES

result:

ok single line: 'YES'

Test #95:

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

input:

5000
60 -49
67 -60
96 -82
99 -85
128 -53
144 -72
239 -56
269 -137
305 -101
309 -167
324 -105
362 -82
428 -120
498 54
590 -38
688 -16
760 60
787 132
855 105
862 180
944 98
997 173
1023 71
1095 45
1174 64
1213 143
1285 31
1360 103
1446 -130
1480 -96
1564 -44
1577 1
1584 8
1598 22
1669 -12
1707 -87
171...

output:

YES

result:

ok single line: 'YES'

Test #96:

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

input:

5000
142 -77
231 -12
278 -54
323 -99
392 -101
449 -30
454 27
537 22
633 -61
688 -102
701 -157
755 -169
756 -170
819 -107
914 -115
976 -12
1048 -146
1115 -74
1134 -213
1203 -301
1222 -282
1313 -232
1366 -191
1417 -193
1437 -244
1529 -121
1628 -220
1668 -213
1714 -134
1775 -73
1820 -180
1898 -28
1959 ...

output:

YES

result:

ok single line: 'YES'

Test #97:

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

input:

5000
54 54
110 -2
131 34
184 -34
227 9
301 19
394 -65
488 28
567 122
661 295
675 201
676 281
706 252
757 282
851 209
889 303
921 215
1016 247
1059 267
1134 310
1196 192
1201 249
1251 254
1340 210
1422 128
1457 163
1467 153
1564 250
1632 318
1683 299
1708 369
1736 316
1786 266
1811 291
1812 344
1816 ...

output:

YES

result:

ok single line: 'YES'

Test #98:

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

input:

5000
78 78
172 94
185 39
205 81
211 101
245 61
332 95
334 -24
370 12
442 84
452 -26
533 94
581 13
639 -93
722 -35
771 -10
835 -59
923 -123
948 -35
971 -60
1047 39
1048 40
1078 10
1081 7
1087 1
1146 -58
1170 -82
1264 -37
1351 -176
1352 -264
1359 -263
1455 -257
1479 -185
1496 -161
1512 -202
1601 -218
...

output:

YES

result:

ok single line: 'YES'

Test #99:

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

input:

5000
28 -10
29 -28
120 -27
161 -159
240 -238
275 -203
362 -290
393 -118
456 -258
461 -321
475 -263
571 -373
648 -277
737 -361
803 -427
852 -450
921 -545
993 -473
1042 -476
1097 -522
1130 -434
1190 -494
1229 -467
1328 -455
1427 -554
1511 -455
1572 -310
1664 -371
1717 -218
1769 -165
1866 -314
1927 -37...

output:

YES

result:

ok single line: 'YES'

Test #100:

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

input:

5000
18 18
98 -62
183 23
211 -31
295 51
334 -33
368 6
457 40
543 -135
633 -49
699 -225
781 -159
793 -77
807 -75
816 -89
829 -79
845 -95
863 -113
948 -198
982 -66
1011 -232
1029 -203
1073 -221
1118 -265
1147 -310
1242 -339
1319 -167
1413 -244
1486 0
1556 -73
1637 151
1688 202
1734 156
1765 187
1767 1...

output:

YES

result:

ok single line: 'YES'

Test #101:

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

input:

5000
49 49
174 -41
202 -6
296 22
313 116
403 43
486 133
560 -40
623 -114
697 -177
781 -251
852 -335
912 -204
1005 -111
1068 -264
1162 -48
1216 100
1236 46
1275 159
1303 187
1380 120
1446 110
1508 -18
1595 44
1668 -4
1758 69
1826 86
1834 162
1860 136
1891 154
1969 105
2042 27
2130 100
2188 130
2281 2...

output:

YES

result:

ok single line: 'YES'

Test #102:

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

input:

5000
100 84
114 92
153 70
245 201
296 109
325 150
351 179
416 88
453 153
456 51
479 48
574 25
624 -20
695 -91
733 -70
781 -129
841 -141
879 -179
949 -81
973 -85
1040 -152
1054 -109
1102 -214
1150 -262
1159 -166
1255 -349
1278 -253
1365 -326
1371 -407
1468 -504
1524 -448
1596 -520
1597 -413
1676 -598...

output:

YES

result:

ok single line: 'YES'

Test #103:

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

input:

5000
45 -45
90 -64
109 -90
160 -58
161 -59
254 -109
268 -138
319 -152
377 -29
456 -108
500 -87
524 -64
543 -59
572 -40
606 -122
653 -169
657 -173
735 -95
777 -88
869 -137
878 -45
946 -36
1012 -104
1049 -38
1055 -7
1108 46
1201 -1
1286 139
1302 224
1344 240
1394 282
1472 232
1508 310
1554 392
1644 30...

output:

YES

result:

ok single line: 'YES'

Test #104:

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

input:

5000
50 50
141 -41
177 -27
235 9
275 -49
353 47
424 -31
441 101
526 186
537 118
588 197
603 248
696 326
785 233
831 415
862 369
870 338
928 330
1014 388
1055 261
1064 252
1091 279
1155 215
1201 302
1299 359
1305 261
1352 353
1392 400
1446 494
1527 413
1583 357
1606 334
1662 440
1710 342
1767 399
183...

output:

YES

result:

ok single line: 'YES'

Test #105:

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

input:

5000
92 92
163 159
177 161
198 145
275 243
342 310
404 248
502 166
569 279
597 346
696 251
728 152
731 123
819 120
842 188
852 211
927 253
943 178
1004 176
1047 219
1139 311
1191 259
1288 356
1354 237
1444 422
1483 332
1492 371
1516 362
1520 334
1554 338
1591 263
1606 300
1666 278
1754 338
1851 426
...

output:

YES

result:

ok single line: 'YES'

Test #106:

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

input:

5000
137 -43
221 41
239 59
275 23
313 61
360 -90
447 14
463 -57
509 -73
514 -6
525 -11
559 -17
603 -95
681 -173
761 -253
850 -164
891 -123
894 -51
914 -126
975 -207
1060 -122
1066 -146
1103 -116
1127 -153
1225 -275
1236 -286
1280 -177
1358 -408
1372 -330
1457 -337
1532 -412
1620 -500
1624 -496
1702 ...

output:

YES

result:

ok single line: 'YES'

Test #107:

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

input:

5000
84 -84
150 -72
204 -18
206 -72
292 -70
343 -105
428 -156
465 -57
548 -20
563 -140
619 -69
691 -125
774 3
789 -65
811 -43
894 -80
990 -56
1040 40
1059 -106
1151 -125
1182 -217
1246 -186
1268 -250
1277 -272
1361 -197
1384 -220
1386 -281
1433 -222
1449 -269
1473 -277
1564 -368
1571 -361
1586 -253
...

output:

YES

result:

ok single line: 'YES'

Test #108:

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

input:

5000
80 -80
129 -129
149 -109
208 -168
239 -137
251 -125
340 -214
409 -145
539 -135
586 -205
593 -81
685 -88
741 -45
768 -18
835 11
872 49
965 86
1043 179
1047 101
1052 100
1069 117
1084 105
1116 164
1180 132
1231 228
1302 208
1310 200
1381 129
1442 279
1443 191
1500 134
1505 190
1602 236
1644 139
1...

output:

YES

result:

ok single line: 'YES'

Test #109:

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

input:

5000
59 59
76 76
107 45
125 63
179 9
242 42
318 72
381 59
461 139
545 -4
643 125
730 223
805 212
825 307
914 287
927 396
940 383
983 327
1057 370
1089 253
1120 221
1200 332
1294 252
1299 243
1370 314
1422 238
1509 175
1576 262
1613 108
1680 78
1719 39
1767 87
1854 0
1886 145
1890 28
1938 -20
2004 46...

output:

YES

result:

ok single line: 'YES'

Test #110:

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

input:

5000
134 -32
169 -83
170 -66
251 -67
330 15
340 104
389 94
449 213
474 188
562 153
630 208
658 236
721 299
739 281
798 340
843 276
853 375
856 372
864 385
907 364
965 379
1018 321
1071 432
1166 474
1168 379
1236 544
1243 551
1245 476
1316 624
1331 553
1396 574
1424 602
1496 530
1505 521
1542 639
157...

output:

YES

result:

ok single line: 'YES'

Test #111:

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

input:

5000
22 22
116 -46
159 -72
240 -29
278 14
362 52
432 0
499 67
579 -70
595 163
648 147
688 70
707 110
776 120
785 111
833 159
903 51
979 229
1033 305
1083 301
1084 251
1128 302
1174 258
1265 395
1330 460
1396 304
1415 394
1450 378
1451 379
1463 367
1499 403
1500 404
1508 413
1598 396
1652 540
1699 48...

output:

NO

result:

ok single line: 'NO'

Test #112:

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

input:

5000
33 -33
160 -32
204 31
292 100
379 12
457 265
538 346
621 429
680 370
687 377
775 187
811 429
814 432
816 465
884 502
925 461
974 510
1067 434
1107 603
1196 563
1261 587
1292 556
1336 512
1341 652
1344 514
1353 505
1451 603
1539 691
1542 688
1610 517
1653 799
1715 737
1735 756
1743 749
1809 757
...

output:

NO

result:

ok single line: 'NO'

Test #113:

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

input:

5000
134 78
162 106
207 61
279 133
326 86
354 134
401 105
416 90
493 167
570 58
605 55
622 72
695 90
769 71
853 155
857 145
860 159
869 165
935 156
951 83
968 100
974 94
1048 99
1144 168
1210 6
1224 20
1260 72
1306 10
1358 56
1360 60
1392 92
1474 62
1526 10
1606 62
1633 -45
1672 -18
1681 -84
1734 -9...

output:

NO

result:

ok single line: 'NO'

Test #114:

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

input:

5000
63 63
178 84
187 169
256 100
337 181
388 232
473 178
541 215
631 147
653 283
705 305
717 243
748 274
840 231
881 223
942 284
1025 182
1063 367
1101 367
1180 288
1276 329
1346 122
1362 192
1432 68
1445 55
1526 138
1556 -56
1573 -26
1605 -39
1621 -7
1626 4
1647 9
1706 42
1744 -17
1783 80
1786 41
...

output:

NO

result:

ok single line: 'NO'

Test #115:

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

input:

5000
71 -71
136 -136
224 -138
231 -131
251 -181
306 -56
354 -111
371 -25
376 -20
401 -8
490 5
573 -84
626 52
725 151
769 -1
821 55
822 54
902 107
936 168
996 108
1003 115
1026 138
1035 147
1118 64
1209 -27
1275 -93
1328 134
1393 -146
1405 -69
1428 -46
1480 6
1505 -19
1583 -81
1610 -70
1634 -97
1655 ...

output:

NO

result:

ok single line: 'NO'

Test #116:

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

input:

5000
10 10
77 77
113 41
147 75
326 88
380 -8
385 34
451 29
514 26
582 -42
674 -134
683 -37
696 -130
755 -189
781 -143
814 -196
854 -163
900 -282
936 -236
940 -318
970 -292
1011 -333
1100 -322
1116 -260
1120 -253
1158 -244
1199 -259
1209 -269
1255 -218
1323 -315
1409 -161
1468 -247
1481 -220
1566 -14...

output:

NO

result:

ok single line: 'NO'

Test #117:

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

input:

5000
88 88
213 213
271 128
296 246
366 271
431 176
520 200
607 287
650 244
710 304
808 111
864 150
928 206
1001 214
1017 141
1073 157
1146 213
1220 286
1310 122
1407 212
1494 306
1523 219
1599 277
1695 449
1721 475
1805 559
1891 645
1938 598
1994 542
2037 353
2041 499
2047 495
2124 412
2219 489
2263...

output:

NO

result:

ok single line: 'NO'

Test #118:

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

input:

5000
68 68
135 1
226 92
371 152
443 -5
463 -25
527 39
544 56
631 -31
726 64
765 67
860 -70
869 -61
935 25
1019 -211
1079 -151
1154 -76
1159 -127
1219 -81
1303 -21
1327 -129
1377 -179
1405 -151
1422 -168
1485 -231
1573 -143
1659 -105
1721 -229
1817 -71
1902 -167
1953 14
2003 65
2051 15
2130 -112
2165...

output:

NO

result:

ok single line: 'NO'

Test #119:

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

input:

5000
74 74
88 60
181 -33
193 47
220 -45
222 -72
267 -119
331 -74
377 -183
451 -137
454 -60
474 -63
492 -62
570 -80
668 -140
670 -40
764 54
821 -3
867 -42
946 -36
970 -60
1052 43
1126 -142
1138 -68
1204 -122
1278 -48
1290 -56
1350 -60
1351 -1
1435 0
1464 83
1516 164
1565 115
1619 112
1681 231
1723 18...

output:

NO

result:

ok single line: 'NO'

Test #120:

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

input:

5000
92 92
154 30
160 82
181 36
246 -50
289 15
377 81
392 -7
475 96
494 198
518 222
615 179
632 336
676 292
755 371
777 319
786 340
799 349
888 353
980 350
1064 442
1117 319
1178 266
1180 258
1267 256
1326 169
1406 110
1501 30
1541 125
1596 220
1597 219
1608 208
1626 165
1677 221
1714 180
1775 123
1...

output:

NO

result:

ok single line: 'NO'

Test #121:

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

input:

5000
126 -65
137 -137
150 -124
155 -102
220 -54
303 29
321 -126
394 11
458 148
473 84
542 94
607 159
629 181
671 163
689 157
775 71
796 139
888 92
951 184
995 121
1014 77
1056 58
1118 -46
1119 16
1198 32
1276 110
1348 38
1363 -47
1382 72
1455 53
1474 164
1477 161
1479 163
1528 145
1554 186
1557 212
...

output:

NO

result:

ok single line: 'NO'

Test #122:

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

input:

5000
111 111
168 77
237 54
247 -5
286 -15
378 -136
476 -44
563 -38
638 -200
663 -225
700 -125
756 -262
808 -266
881 -339
978 -318
1030 -488
1119 -399
1120 -436
1121 -398
1185 -397
1221 -461
1264 -425
1332 -382
1390 -450
1392 -392
1465 -317
1519 -390
1550 -402
1608 -371
1660 -344
1703 -292
1742 -296
...

output:

NO

result:

ok single line: 'NO'

Test #123:

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

input:

5000
89 -55
112 17
174 30
208 -32
218 64
248 84
300 32
394 54
420 152
487 126
495 219
501 227
523 255
529 233
623 355
707 271
736 261
816 242
910 68
948 30
958 162
1051 -53
1087 -17
1176 -106
1220 40
1276 -94
1339 -150
1392 -210
1403 -157
1454 -250
1526 -199
1570 -278
1617 -325
1618 -322
1672 -326
1...

output:

NO

result:

ok single line: 'NO'

Test #124:

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

input:

5000
98 -39
134 -98
218 -218
263 -134
325 -173
400 -235
474 -384
493 -310
516 -426
557 -385
634 -403
640 -462
645 -468
698 -420
706 -473
723 -445
820 -542
847 -515
852 -428
940 -608
947 -615
966 -634
987 -520
1029 -571
1057 -613
1122 -543
1216 -702
1289 -608
1350 -836
1369 -775
1436 -750
1480 -817
1...

output:

NO

result:

ok single line: 'NO'

Test #125:

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

input:

5000
1 1
25 25
43 7
84 48
94 58
168 107
228 142
275 82
287 95
381 13
403 107
408 35
498 40
596 32
615 130
704 13
733 102
759 47
803 91
886 174
953 241
986 274
1000 288
1012 300
1069 73
1103 391
1147 347
1148 357
1173 348
1248 373
1287 259
1379 298
1448 282
1478 351
1559 312
1640 231
1710 382
1791 31...

output:

NO

result:

ok single line: 'NO'

Test #126:

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

input:

5000
73 73
76 76
131 38
209 21
300 8
384 99
436 -76
534 -128
555 -9
627 -81
681 -30
770 -46
842 -135
879 -118
906 -81
978 18
986 26
1017 57
1107 147
1124 164
1142 -54
1186 190
1208 146
1265 212
1337 197
1389 269
1442 249
1537 101
1554 196
1621 151
1674 98
1772 196
1797 221
1857 84
1945 73
2021 149
2...

output:

NO

result:

ok single line: 'NO'

Test #127:

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

input:

5000
12 12
175 96
267 109
300 17
358 200
376 142
455 103
498 60
573 182
615 177
678 135
714 276
725 240
766 224
810 268
841 237
894 265
901 184
910 191
1009 253
1091 171
1119 143
1213 168
1245 17
1322 -60
1351 49
1361 -31
1390 -41
1398 -62
1463 3
1547 -81
1631 -70
1721 93
1792 22
1835 -21
1905 49
19...

output:

NO

result:

ok single line: 'NO'

Test #128:

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

input:

5000
37 37
109 21
123 63
203 77
273 143
322 213
356 164
421 130
519 -33
611 65
697 145
772 59
811 259
835 220
932 332
969 295
987 313
1036 235
1078 222
1113 257
1208 264
1302 256
1393 162
1438 210
1475 173
1490 165
1494 188
1579 184
1632 152
1719 99
1786 65
1870 216
1871 217
1959 305
2055 132
2122 3...

output:

NO

result:

ok single line: 'NO'

Test #129:

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

input:

5000
121 121
219 23
220 42
286 -42
341 24
352 -86
421 -97
485 -17
581 15
584 -81
612 -16
622 12
681 -6
705 -89
783 -65
877 83
961 -1
980 -11
1060 18
1086 -62
1118 -4
1128 -14
1166 -36
1183 41
1256 -32
1277 24
1342 -118
1361 -99
1413 -151
1438 -53
1509 -126
1518 -46
1555 -83
1642 4
1663 -55
1741 61
1...

output:

NO

result:

ok single line: 'NO'

Test #130:

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

input:

5000
167 -85
255 -91
263 -83
342 -3
403 -162
429 -223
484 -249
521 -157
534 -170
546 -182
619 -109
688 -194
730 -220
755 -178
772 -212
811 -195
821 -173
830 -154
853 -131
925 -163
995 11
1015 50
1035 -59
1068 84
1153 -1
1180 51
1232 -26
1235 -29
1257 26
1322 -7
1380 -72
1455 61
1534 -14
1616 -100
16...

output:

NO

result:

ok single line: 'NO'

Test #131:

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

input:

11
1 1
2 1
3 1
4 -2
6 -2
6 1
8 1
11 5
11 1
13 5
14 2

output:

NO

result:

ok single line: 'NO'

Test #132:

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

input:

10
1 1
2 1
3 1
4 -2
6 -2
6 1
8 1
11 1
13 5
14 2

output:

NO

result:

ok single line: 'NO'

Test #133:

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

input:

11
1 -1
2 -1
3 1
4 1
4 -1
5 -1
7 2
8 1
10 -2
11 1
12 3

output:

NO

result:

ok single line: 'NO'

Test #134:

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

input:

15
1 1
2 1
3 2
4 4
6 3
7 1
8 1
11 5
11 1
13 5
15 1
16 3
17 0
18 2
19 5

output:

NO

result:

ok single line: 'NO'

Test #135:

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

input:

9
2 2
3 2
4 4
7 0
7 3
8 3
8 -1
9 -1
10 -3

output:

NO

result:

ok single line: 'NO'

Test #136:

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

input:

9
2 2
3 2
4 3
7 0
7 3
8 4
8 -1
9 -1
10 -3

output:

NO

result:

ok single line: 'NO'

Test #137:

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

input:

10
1 1
2 1
3 1
9 -5
9 1
9 -6
10 -5
11 -8
15 -4
21 2


output:

NO

result:

ok single line: 'NO'

Test #138:

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

input:

10
1 -1
2 -1
3 1
4 2
4 -1
5 3
7 2
8 3
10 -2
11 1


output:

NO

result:

ok single line: 'NO'

Test #139:

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

input:

6
2 1
3 1
5 5
6 1
8 7
8 6

output:

YES

result:

ok single line: 'YES'

Test #140:

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

input:

9
2 2
3 2
4 3
6 0
7 3
8 3
8 -1
9 -1
10 -3

output:

YES

result:

ok single line: 'YES'

Test #141:

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

input:

11
1 1
2 1
3 1
4 4
6 4
7 1
8 1
11 5
11 1
13 5
15 1

output:

YES

result:

ok single line: 'YES'

Test #142:

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

input:

11
1 1
2 1
3 1
4 -2
6 -2
7 1
8 1
11 5
11 1
13 5
15 1

output:

YES

result:

ok single line: 'YES'

Test #143:

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

input:

11
1 1
2 1
3 1
4 -2
6 -2
7 1
8 1
11 5
11 1
13 5
14 2

output:

YES

result:

ok single line: 'YES'

Test #144:

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

input:

10
1 1
2 1
3 1
4 -2
6 -2
6 1
8 1
11 1
14 5
14 2

output:

YES

result:

ok single line: 'YES'

Test #145:

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

input:

8
1 -1
2 -1
3 1
4 1
4 -1
5 -1
7 2
8 1


output:

YES

result:

ok single line: 'YES'

Test #146:

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

input:

10
1 -1
2 -1
3 1
4 2
4 -1
5 3
7 2
8 1
10 -2
11 1


output:

YES

result:

ok single line: 'YES'

Test #147:

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

input:

13
1 -1
2 -1
3 1
4 1
4 -1
5 -1
7 2
8 1
10 -2
11 1
12 0
12 1
14 -2

output:

YES

result:

ok single line: 'YES'

Test #148:

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

input:

14
1 1
2 1
3 1
4 4
6 4
7 1
8 1
11 5
11 1
13 5
15 1
16 3
17 1
17 2

output:

YES

result:

ok single line: 'YES'

Test #149:

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

input:

14
1 1
2 1
3 1
4 4
6 4
7 1
8 1
11 5
11 1
13 5
15 1
16 3
17 0
18 2

output:

YES

result:

ok single line: 'YES'

Test #150:

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

input:

9
1 1
2 1
3 1
9 -5
9 -6
10 -5
11 -8
15 -4
21 2


output:

YES

result:

ok single line: 'YES'

Subtask #5:

score: 20
Accepted

Dependency #3:

100%
Accepted

Test #151:

score: 20
Accepted
time: 85ms
memory: 87768kb

input:

100000
103 81
168 59
178 124
195 114
200 131
293 229
310 246
399 136
472 157
538 18
576 -20
613 17
634 -4
703 84
744 -114
799 -59
876 -136
911 -73
927 -101
940 -72
977 -85
1030 -109
1044 -162
1090 -176
1143 -77
1175 -130
1245 25
1323 -45
1338 103
1437 217
1474 180
1583 289
1632 240
1670 278
1679 118...

output:

YES

result:

ok single line: 'YES'

Test #152:

score: 0
Accepted
time: 94ms
memory: 88872kb

input:

100000
138 138
194 82
292 47
350 -16
393 -31
406 -74
428 -40
498 -18
526 2
579 55
624 10
631 17
633 19
641 11
682 30
693 -19
751 -77
833 -159
900 -30
948 -44
975 -92
1072 -168
1093 -147
1165 -75
1198 -42
1289 -71
1358 49
1418 -20
1516 18
1653 155
1729 231
1822 324
1846 300
1906 240
1988 158
2052 -80...

output:

YES

result:

ok single line: 'YES'

Test #153:

score: 0
Accepted
time: 103ms
memory: 88528kb

input:

100000
78 78
171 171
262 108
330 40
405 185
422 -52
432 -35
438 -68
472 -34
553 47
627 121
710 -62
795 -47
848 -100
929 38
1014 -181
1029 -281
1098 -350
1116 -368
1214 -466
1254 -506
1278 -530
1294 -514
1360 -266
1411 -397
1502 -448
1529 -333
1557 -305
1624 -238
1688 -306
1787 -174
1850 -138
1869 -1...

output:

YES

result:

ok single line: 'YES'

Test #154:

score: 0
Accepted
time: 92ms
memory: 85980kb

input:

100000
102 72
149 102
165 133
246 149
326 214
331 299
420 210
427 217
508 298
523 294
559 283
644 319
714 404
722 482
754 514
823 474
890 650
945 583
988 748
1021 705
1034 702
1078 658
1131 605
1157 631
1198 590
1279 715
1302 648
1333 679
1347 693
1432 778
1479 731
1553 805
1586 838
1619 671
1629 87...

output:

YES

result:

ok single line: 'YES'

Test #155:

score: 0
Accepted
time: 96ms
memory: 89036kb

input:

100000
23 -23
172 -73
238 -40
277 -79
292 -64
323 -95
327 -99
380 -152
406 26
504 -126
555 -173
597 -224
643 -215
727 -177
763 -141
861 -239
957 -335
1013 -261
1102 -391
1162 -302
1238 -438
1241 -362
1291 -491
1381 -401
1456 -326
1515 -385
1549 -419
1589 -459
1597 -441
1690 -358
1700 -451
1719 -368
...

output:

YES

result:

ok single line: 'YES'

Test #156:

score: 0
Accepted
time: 95ms
memory: 87908kb

input:

100000
72 72
169 169
251 87
262 76
331 7
354 40
401 -17
413 -29
428 30
433 -9
478 36
546 -32
627 -14
675 97
838 260
847 251
855 243
944 332
993 381
1025 49
1113 501
1130 518
1148 536
1159 525
1239 445
1327 413
1336 524
1417 605
1472 533
1558 636
1562 640
1648 726
1683 691
1772 780
1799 753
1829 783
...

output:

YES

result:

ok single line: 'YES'

Test #157:

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

input:

100000
14 -14
144 116
210 50
263 -3
283 -23
311 45
341 -25
385 -69
414 5
431 -81
459 -109
481 -87
536 -142
540 -146
608 -98
695 -165
765 -95
794 -124
853 -78
905 -13
939 -65
1009 21
1092 -132
1147 -49
1192 -32
1243 -77
1313 -51
1391 19
1431 -89
1487 -129
1521 1
1558 -33
1595 -73
1626 -42
1671 3
1760...

output:

YES

result:

ok single line: 'YES'

Test #158:

score: 0
Accepted
time: 94ms
memory: 87864kb

input:

100000
75 75
241 85
302 146
395 239
476 163
531 375
579 320
654 498
698 542
762 478
826 414
866 374
872 380
910 423
950 418
1003 325
1096 378
1142 232
1186 142
1204 124
1237 186
1312 82
1376 18
1440 -46
1505 19
1527 -3
1599 157
1689 -21
1723 69
1728 -50
1781 -103
1791 -55
1795 -109
1825 -113
1886 -1...

output:

YES

result:

ok single line: 'YES'

Test #159:

score: 0
Accepted
time: 90ms
memory: 89060kb

input:

100000
10 10
138 8
176 -30
188 -55
285 -115
306 -136
309 -18
337 -133
419 -23
449 -105
466 24
561 7
631 119
638 182
712 108
775 189
866 136
873 143
957 45
1016 0
1067 59
1098 -20
1134 16
1197 79
1202 74
1282 -6
1335 47
1402 114
1427 -51
1435 97
1436 96
1480 89
1532 140
1535 192
1577 195
1667 237
176...

output:

YES

result:

ok single line: 'YES'

Test #160:

score: 0
Accepted
time: 92ms
memory: 84060kb

input:

100000
125 -75
163 -163
175 -125
245 -221
273 -193
351 -115
447 -211
544 -308
555 -319
563 -311
655 -403
684 -151
734 -482
795 -432
807 -555
832 -543
866 -564
898 -532
940 -574
1003 -511
1077 -585
1085 -577
1131 -623
1149 -605
1164 -530
1238 -590
1276 -516
1333 -611
1376 -568
1385 -559
1442 -502
153...

output:

YES

result:

ok single line: 'YES'

Test #161:

score: 0
Accepted
time: 17ms
memory: 81844kb

input:

100000
78 28
82 -22
151 -87
202 -36
237 -1
298 60
320 82
395 7
408 20
477 -18
487 79
579 89
592 184
653 171
686 212
687 211
719 243
789 173
811 245
893 277
941 195
1042 224
1091 175
1148 118
1235 205
1283 253
1364 325
1441 95
1499 153
1537 172
1593 59
1637 15
1724 115
1809 102
1900 187
1985 181
2080...

output:

NO

result:

ok single line: 'NO'

Test #162:

score: 0
Accepted
time: 26ms
memory: 85168kb

input:

100000
27 27
38 16
97 -43
142 2
208 -64
285 -27
303 -9
389 -95
394 -100
476 -7
484 -18
583 -109
663 -10
679 -173
739 -189
823 -197
844 -218
906 -113
940 -190
996 -134
1070 -60
1083 -47
1102 -156
1107 -33
1200 -28
1262 122
1305 165
1358 60
1452 124
1471 143
1564 236
1569 231
1605 218
1680 267
1711 34...

output:

NO

result:

ok single line: 'NO'

Test #163:

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

input:

100000
171 9
236 74
318 -8
405 -81
421 -79
432 -95
439 -68
524 -160
540 -75
632 -84
675 -176
704 -127
731 -125
748 -142
832 -58
866 -98
962 72
1006 -24
1055 165
1150 260
1168 278
1259 369
1294 404
1363 473
1444 554
1542 652
1585 695
1681 791
1691 781
1716 116
1761 711
1800 750
1926 756
1958 908
1992...

output:

NO

result:

ok single line: 'NO'

Test #164:

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

input:

100000
89 89
208 151
245 131
273 103
362 14
382 34
398 94
441 93
486 48
517 17
544 -10
588 50
656 -122
723 -55
758 -20
803 -54
869 -65
872 -2
986 1
1075 112
1087 35
1195 -73
1205 -63
1229 23
1243 -101
1272 -72
1352 -87
1369 -135
1406 -152
1423 -155
1487 -172
1586 -219
1665 -120
1681 -215
1691 -225
1...

output:

NO

result:

ok single line: 'NO'

Test #165:

score: 0
Accepted
time: 17ms
memory: 84568kb

input:

100000
32 -32
118 54
192 -20
228 -26
309 -5
311 -107
343 -77
353 -67
451 31
525 -109
549 -43
630 -100
699 -169
789 -79
961 -251
974 -264
1070 -168
1071 -167
1072 -166
1073 -165
1111 -203
1197 -19
1296 -117
1370 -216
1453 -142
1518 -225
1543 -250
1563 -255
1570 -248
1680 -290
1764 -54
1814 -104
1865 ...

output:

NO

result:

ok single line: 'NO'

Test #166:

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

input:

100000
75 75
125 125
186 64
231 19
255 -5
284 -32
358 -106
385 -133
390 -138
399 -33
423 -129
455 -137
473 -119
482 -105
503 -149
532 -128
570 -158
584 -172
603 -153
641 -115
713 -43
751 -81
769 -63
819 -13
857 -120
863 25
956 -62
1039 -145
1113 31
1159 -173
1282 -50
1368 36
1422 -219
1595 -191
1615...

output:

NO

result:

ok single line: 'NO'

Test #167:

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

input:

100000
65 -65
148 -148
212 -212
230 -230
260 -260
328 -192
477 -187
498 -208
555 -265
618 -202
645 -264
719 -101
727 -168
816 -93
915 -83
961 -37
1006 8
1086 88
1176 -2
1216 38
1222 44
1319 -53
1400 -134
1419 -115
1430 -104
1473 -147
1529 -91
1563 -182
1583 -105
1638 -125
1691 -50
1783 -103
1789 -5
...

output:

NO

result:

ok single line: 'NO'

Test #168:

score: 0
Accepted
time: 19ms
memory: 81668kb

input:

100000
4 4
5 3
39 15
61 -29
145 -113
205 -173
231 -7
262 -116
278 -147
344 -166
419 -91
424 -100
599 79
657 137
735 -96
833 157
932 58
954 80
1096 59
1187 -62
1196 29
1205 47
1292 38
1338 134
1373 123
1449 199
1454 88
1509 194
1555 203
1585 233
1643 175
1687 249
1778 222
1864 308
1914 358
1997 275
2...

output:

NO

result:

ok single line: 'NO'

Test #169:

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

input:

100000
30 -30
154 -63
253 -71
282 28
298 -58
319 -79
326 -42
343 -89
371 -61
438 -72
523 -213
619 -309
713 -403
797 -128
863 -487
885 -421
976 -399
1063 -221
1070 -228
1140 -308
1189 -298
1200 -260
1255 -249
1300 -360
1314 -374
1389 -449
1400 -460
1481 -541
1484 -538
1525 -497
1607 -315
1626 -598
16...

output:

NO

result:

ok single line: 'NO'

Test #170:

score: 0
Accepted
time: 107ms
memory: 87684kb

input:

100000
74 -74
125 -125
133 -133
170 -170
244 -96
297 -43
322 -68
400 10
483 93
569 7
598 -22
695 -119
747 -67
763 -51
814 0
819 5
839 25
850 36
918 104
926 96
1013 9
1040 36
1122 118
1217 213
1309 305
1351 347
1420 416
1425 411
1465 371
1509 415
1583 489
1583 489
1610 462
1629 443
1638 434
1715 511
...

output:

YES

result:

ok single line: 'YES'

Subtask #6:

score: 10
Accepted

Dependency #5:

100%
Accepted

Test #171:

score: 10
Accepted
time: 267ms
memory: 105116kb

input:

300000
15 -15
32 2
123 -89
194 -160
209 -145
277 -213
306 -242
412 -254
500 -166
522 -188
528 -194
605 -301
639 -271
730 -328
798 -237
856 -202
932 -126
964 -94
984 -114
985 -113
1025 -73
1047 -95
1055 -260
1132 -164
1166 -87
1229 -67
1248 -86
1345 -183
1413 -130
1447 -149
1534 -236
1625 -327
1660 -...

output:

YES

result:

ok single line: 'YES'

Test #172:

score: 0
Accepted
time: 284ms
memory: 103972kb

input:

300000
39 39
57 22
111 75
194 -8
280 -94
340 -154
365 -129
407 -87
467 -27
539 -99
562 -122
658 -218
693 21
769 -259
865 -163
868 -166
930 -183
1017 -191
1029 -203
1045 -219
1056 -208
1118 -146
1127 -155
1217 -104
1230 -258
1249 -239
1304 -184
1331 -211
1335 -207
1403 -245
1404 -275
1462 -216
1471 -...

output:

YES

result:

ok single line: 'YES'

Test #173:

score: 0
Accepted
time: 261ms
memory: 101736kb

input:

300000
11 -11
26 4
74 -44
170 -140
182 -128
183 -127
221 -165
299 -87
342 -130
353 -141
517 -113
616 -14
658 -45
720 90
734 104
791 161
843 28
922 30
1013 -61
1080 6
1090 109
1105 16
1157 31
1194 46
1292 144
1295 83
1393 49
1395 147
1478 130
1521 87
1625 -17
1692 47
1722 20
1731 29
1814 50
1870 -54
...

output:

YES

result:

ok single line: 'YES'

Test #174:

score: 0
Accepted
time: 263ms
memory: 101524kb

input:

300000
75 4
159 -9
184 16
210 42
267 -15
323 -71
324 75
398 -70
439 -144
461 -185
522 -146
597 -221
673 -207
674 -296
716 -297
758 -338
836 -302
883 -349
918 -314
941 -337
953 -325
979 -299
1012 -380
1106 -238
1180 -332
1244 -248
1252 -256
1308 -200
1350 -158
1397 -205
1452 -312
1534 -68
1582 -116
1...

output:

YES

result:

ok single line: 'YES'

Test #175:

score: 0
Accepted
time: 256ms
memory: 104776kb

input:

300000
16 -16
68 36
77 45
160 122
175 107
218 125
251 150
287 183
301 133
310 142
380 72
470 147
494 186
516 208
534 162
556 212
654 310
677 287
697 307
753 363
781 391
794 190
892 306
942 356
979 319
1073 404
1102 196
1123 225
1211 175
1301 353
1371 423
1463 515
1501 553
1597 649
1665 717
1734 786
...

output:

YES

result:

ok single line: 'YES'

Test #176:

score: 0
Accepted
time: 257ms
memory: 104256kb

input:

300000
76 76
240 74
304 157
354 188
397 145
431 179
452 158
505 138
573 105
631 37
636 95
693 43
714 64
791 -13
814 100
881 77
931 10
944 40
975 71
995 51
1091 27
1092 146
1165 219
1212 172
1226 186
1294 147
1356 118
1435 135
1436 136
1439 56
1485 87
1513 133
1565 167
1619 221
1693 115
1749 351
1799...

output:

YES

result:

ok single line: 'YES'

Test #177:

score: 0
Accepted
time: 264ms
memory: 105064kb

input:

300000
83 83
199 164
297 297
332 262
385 315
389 199
463 393
560 296
561 295
612 244
649 281
742 319
798 132
808 122
899 213
985 127
1039 181
1109 111
1208 210
1274 276
1277 273
1336 332
1382 378
1419 341
1421 339
1504 422
1556 188
1629 547
1712 630
1762 680
1846 474
1888 638
1933 596
1968 683
2024 ...

output:

YES

result:

ok single line: 'YES'

Test #178:

score: 0
Accepted
time: 262ms
memory: 104372kb

input:

300000
169 78
252 86
263 169
286 75
372 12
431 98
443 -47
533 -149
534 -150
569 -115
581 -59
621 -143
678 -200
699 -103
717 -203
736 -184
747 -195
814 -262
824 -272
922 -370
1003 -289
1090 -376
1166 -221
1194 -328
1230 -292
1254 -268
1316 -300
1414 -108
1438 -206
1477 -132
1523 -125
1580 -68
1658 -1...

output:

YES

result:

ok single line: 'YES'

Test #179:

score: 0
Accepted
time: 278ms
memory: 104860kb

input:

300000
81 81
144 26
188 85
280 74
339 133
427 45
523 141
617 -18
641 71
666 47
744 96
786 174
787 215
862 216
949 53
1038 142
1176 4
1203 140
1213 -23
1303 -123
1354 -72
1448 -166
1544 -33
1583 -262
1634 -172
1659 -147
1669 -137
1714 -223
1773 -151
1833 -92
1854 -91
1893 -109
1897 -113
1930 -80
1955...

output:

YES

result:

ok single line: 'YES'

Test #180:

score: 0
Accepted
time: 260ms
memory: 105012kb

input:

300000
80 80
111 49
141 19
204 -44
281 33
325 -11
422 -108
479 -51
502 -74
592 16
602 -57
658 26
739 163
787 115
834 68
921 -19
953 13
1016 -50
1093 82
1148 27
1220 -100
1311 -9
1368 -28
1378 -76
1381 -73
1422 -32
1423 -66
1499 -31
1512 -94
1558 -140
1629 -69
1721 -161
1802 -107
1834 -112
1850 -96
1...

output:

YES

result:

ok single line: 'YES'

Test #181:

score: 0
Accepted
time: 46ms
memory: 94436kb

input:

300000
60 60
144 -24
166 18
283 115
388 10
418 40
428 30
463 94
557 89
561 -5
608 46
648 86
739 93
805 111
829 87
864 52
940 128
975 177
1042 230
1100 288
1169 163
1192 380
1221 409
1252 440
1280 357
1302 412
1347 479
1437 569
1486 434
1562 596
1604 638
1686 520
1687 555
1743 556
1771 611
1811 599
1...

output:

NO

result:

ok single line: 'NO'

Test #182:

score: 0
Accepted
time: 42ms
memory: 93184kb

input:

300000
30 -30
102 -102
109 -95
181 -113
221 -73
252 -42
328 34
409 115
494 30
568 -44
617 -93
630 -80
702 -8
765 -68
770 -71
848 2
903 -76
1000 57
1011 143
1109 45
1180 -26
1199 -45
1245 154
1268 1
1270 -24
1323 -77
1331 -69
1365 -22
1372 -103
1464 -4
1491 -31
1533 11
1601 -96
1611 89
1671 29
1755 -...

output:

NO

result:

ok single line: 'NO'

Test #183:

score: 0
Accepted
time: 41ms
memory: 93808kb

input:

300000
56 -56
110 -110
117 -37
198 -117
214 -36
237 3
316 82
369 29
386 46
411 21
423 33
509 -53
556 -6
572 -22
635 -20
734 140
810 216
842 41
896 238
1074 60
1170 184
1213 156
1248 199
1323 234
1406 309
1446 392
1456 362
1481 352
1542 326
1632 236
1672 387
1765 369
1802 276
1803 332
1811 341
1814 3...

output:

NO

result:

ok single line: 'NO'

Test #184:

score: 0
Accepted
time: 49ms
memory: 93492kb

input:

300000
41 -41
126 44
189 -29
219 77
242 54
258 38
281 15
370 107
376 98
463 11
507 104
596 56
618 -33
690 78
772 -76
792 6
855 7
978 -116
1016 -78
1095 1
1176 -80
1184 -88
1213 -117
1299 -31
1322 -56
1353 -8
1435 -121
1443 -113
1463 -133
1477 -119
1547 -39
1636 40
1693 97
1741 -49
1817 221
1834 145
...

output:

NO

result:

ok single line: 'NO'

Test #185:

score: 0
Accepted
time: 36ms
memory: 92472kb

input:

300000
53 -53
144 38
196 -14
197 -13
269 -85
299 -65
306 -62
350 -106
426 -55
482 -182
581 -27
630 -126
696 -142
719 -165
779 -105
831 -157
897 -223
918 -244
969 -295
1060 -204
1061 -205
1154 -112
1167 -99
1222 -44
1257 -76
1352 86
1379 -9
1475 155
1559 239
1633 313
1659 287
1707 335
1795 247
1854 3...

output:

NO

result:

ok single line: 'NO'

Test #186:

score: 0
Accepted
time: 41ms
memory: 93964kb

input:

300000
11 11
20 20
108 -68
190 -150
223 -183
229 -177
278 -132
327 -83
501 -179
590 -346
641 -257
648 -397
671 -404
751 -461
792 -420
864 -492
977 -379
1013 -415
1029 -431
1040 -442
1110 -381
1172 -310
1226 -364
1237 -353
1331 -447
1374 -490
1389 -475
1410 -372
1476 -496
1552 -506
1559 -499
1635 -57...

output:

NO

result:

ok single line: 'NO'

Test #187:

score: 0
Accepted
time: 48ms
memory: 90812kb

input:

300000
143 143
160 49
233 87
310 164
372 160
378 102
423 108
433 63
463 73
550 16
568 -2
600 103
676 42
754 -36
827 -34
910 -109
927 -192
946 -156
999 -209
1070 -175
1074 -134
1089 -138
1090 -149
1159 -79
1200 -120
1284 -204
1366 -122
1460 -148
1482 -238
1520 -276
1582 -214
1641 -273
1724 -356
1793 ...

output:

NO

result:

ok single line: 'NO'

Test #188:

score: 0
Accepted
time: 42ms
memory: 92524kb

input:

300000
17 -17
100 -24
159 21
185 61
280 -34
305 35
307 -11
346 28
386 68
450 4
511 -57
523 -45
534 -56
610 20
705 -9
716 126
718 124
740 102
792 50
824 115
876 30
921 -15
933 -3
962 26
1051 -63
1058 82
1073 -70
1076 -85
1167 -88
1252 -264
1297 -179
1366 -378
1405 -309
1410 -412
1481 -483
1516 -417
1...

output:

NO

result:

ok single line: 'NO'

Test #189:

score: 0
Accepted
time: 38ms
memory: 92424kb

input:

300000
35 -35
194 -52
246 -104
273 -77
293 -123
363 -167
399 -97
407 -131
464 -82
538 -8
622 -139
711 165
749 127
761 139
763 141
788 76
798 116
815 106
825 99
871 53
927 -3
998 89
1055 68
1092 162
1190 260
1267 183
1362 88
1402 48
1431 77
1478 124
1483 125
1500 112
1541 129
1619 71
1701 67
1799 -31...

output:

NO

result:

ok single line: 'NO'

Test #190:

score: 0
Accepted
time: 38ms
memory: 92632kb

input:

300000
54 54
149 -41
240 50
344 127
396 154
446 256
480 206
510 290
571 259
595 320
642 282
733 235
793 433
855 495
949 401
992 444
1054 382
1124 452
1272 304
1337 369
1429 373
1528 376
1540 388
1558 277
1581 429
1587 406
1640 423
1724 560
1776 612
1832 668
1850 476
1860 650
1863 657
1892 660
1958 6...

output:

NO

result:

ok single line: 'NO'

Subtask #7:

score: 20
Accepted

Dependency #4:

100%
Accepted

Dependency #6:

100%
Accepted

Test #191:

score: 20
Accepted
time: 301ms
memory: 100320kb

input:

300000
70 -70
123 -17
234 -115
312 -102
399 -93
476 -16
519 -59
534 -44
589 11
648 -180
727 31
817 -48
892 -59
973 16
1037 97
1058 161
1059 139
1124 140
1138 204
1236 218
1241 311
1309 316
1345 343
1373 371
1393 379
1472 272
1538 206
1616 351
1697 128
1719 47
1726 25
1781 -23
1861 32
1954 -196
1985 ...

output:

YES

result:

ok single line: 'YES'

Test #192:

score: 0
Accepted
time: 297ms
memory: 99784kb

input:

300000
36 -31
117 -26
157 -67
176 -107
241 -21
338 -86
422 -8
513 76
557 -55
617 -99
637 -115
685 -95
686 -48
744 -106
773 -135
835 -47
850 -73
936 -58
957 28
1013 63
1050 7
1135 -59
1148 -72
1247 -171
1313 -237
1395 26
1440 -319
1499 -215
1552 -274
1630 -268
1723 -346
1807 -253
1873 -403
1941 -337
...

output:

YES

result:

ok single line: 'YES'

Test #193:

score: 0
Accepted
time: 301ms
memory: 101144kb

input:

300000
35 -35
145 -111
205 -145
206 -86
231 -85
277 -157
333 -101
394 -40
475 -111
561 41
593 -77
653 -17
691 -45
771 101
818 148
841 125
899 183
987 21
1068 95
1095 -13
1177 -95
1189 14
1251 -107
1256 -164
1340 -169
1373 -80
1446 26
1479 -7
1529 -47
1578 -57
1614 -142
1667 -89
1681 -106
1732 -103
1...

output:

YES

result:

ok single line: 'YES'

Test #194:

score: 0
Accepted
time: 293ms
memory: 101040kb

input:

300000
61 61
88 34
225 133
310 171
388 8
447 -51
459 86
550 -39
631 -49
655 -130
671 -57
724 -110
782 -168
795 -73
827 -213
885 -155
886 -181
928 -112
977 -161
988 -150
1085 -154
1163 -53
1177 -117
1255 -39
1276 -131
1279 -60
1358 -57
1401 -179
1449 -227
1541 -135
1624 -52
1677 -136
1742 -105
1772 -...

output:

YES

result:

ok single line: 'YES'

Test #195:

score: 0
Accepted
time: 294ms
memory: 99832kb

input:

300000
125 -71
222 -222
301 -125
390 -301
484 -390
526 -442
599 -515
653 -569
742 -480
827 -565
884 -484
917 -541
1003 -455
1044 -414
1119 -508
1179 -339
1248 -330
1340 -399
1358 -422
1437 -361
1520 -278
1578 -220
1582 -440
1623 -216
1667 -257
1697 -213
1711 -197
1769 -183
1775 -255
1821 -295
1903 -...

output:

YES

result:

ok single line: 'YES'

Test #196:

score: 0
Accepted
time: 284ms
memory: 97932kb

input:

300000
154 34
236 -48
319 -131
415 94
442 -8
488 -54
584 -150
665 -69
713 -35
736 -94
741 -99
799 -41
883 43
891 35
929 73
946 -117
982 54
1059 90
1114 32
1121 -23
1209 39
1241 95
1306 127
1317 171
1412 76
1467 131
1549 160
1558 222
1646 310
1647 311
1683 213
1713 275
1801 305
1818 376
1847 393
1928...

output:

YES

result:

ok single line: 'YES'

Test #197:

score: 0
Accepted
time: 293ms
memory: 101332kb

input:

300000
140 -90
233 -140
234 -232
323 -233
401 -221
475 -147
488 -134
540 -186
636 -143
643 -83
706 -146
717 -157
753 -90
762 -121
802 -130
867 -170
869 -105
894 -103
912 -128
925 -123
929 -110
984 -127
986 -70
1067 -72
1068 11
1113 12
1197 141
1296 240
1329 273
1406 57
1450 306
1458 350
1529 227
155...

output:

YES

result:

ok single line: 'YES'

Test #198:

score: 0
Accepted
time: 300ms
memory: 101188kb

input:

300000
31 -31
45 -24
74 -45
113 -16
133 23
184 -48
283 -147
294 -136
360 3
458 -168
511 -70
552 -74
609 -17
677 51
758 -115
836 -30
852 48
927 -43
972 2
989 32
1033 -25
1124 19
1211 -116
1272 -29
1276 32
1282 36
1364 112
1438 30
1504 120
1519 186
1592 135
1607 208
1644 223
1673 289
1702 260
1790 172...

output:

YES

result:

ok single line: 'YES'

Test #199:

score: 0
Accepted
time: 308ms
memory: 97864kb

input:

300000
11 11
78 10
117 -56
185 -95
252 -27
307 -15
393 40
398 76
462 12
477 71
562 -3
659 82
721 117
779 175
867 179
908 263
911 222
974 225
1032 346
1077 288
1157 221
1245 301
1249 309
1344 210
1441 307
1471 337
1495 361
1523 305
1603 413
1682 333
1704 514
1757 492
1847 567
1865 477
1887 517
1970 4...

output:

YES

result:

ok single line: 'YES'

Test #200:

score: 0
Accepted
time: 306ms
memory: 99688kb

input:

300000
44 -42
90 -88
124 1
139 -69
164 -54
192 -66
271 -94
339 -213
355 -145
366 -229
380 -232
466 -318
480 -332
575 -218
651 -313
683 -281
737 -237
825 -423
852 -335
867 -465
965 -367
993 -450
1052 -398
1076 -339
1118 -332
1130 -344
1161 -313
1201 -374
1255 -353
1326 -336
1418 -428
1430 -440
1460 -...

output:

YES

result:

ok single line: 'YES'

Test #201:

score: 0
Accepted
time: 307ms
memory: 100944kb

input:

300000
107 -81
118 -66
137 -47
172 -55
188 -98
244 -82
336 -42
369 50
424 -38
489 27
531 17
565 19
582 2
617 -15
647 37
717 -63
794 7
868 14
929 27
991 88
995 89
1071 85
1169 63
1237 -5
1248 161
1310 6
1326 68
1369 9
1423 52
1426 63
1471 111
1517 65
1553 66
1628 -46
1727 53
1779 105
1834 29
1898 224...

output:

YES

result:

ok single line: 'YES'

Test #202:

score: 0
Accepted
time: 304ms
memory: 97920kb

input:

300000
40 -40
124 44
206 26
290 46
381 -38
475 49
538 -45
612 112
661 38
702 46
779 123
807 87
824 78
903 157
938 95
1025 105
1088 192
1117 139
1206 50
1220 36
1279 168
1353 95
1371 187
1436 169
1479 122
1494 79
1496 94
1539 53
1573 96
1665 -5
1725 87
1785 55
1881 115
1918 211
1968 198
1973 193
2024...

output:

YES

result:

ok single line: 'YES'

Test #203:

score: 0
Accepted
time: 296ms
memory: 101056kb

input:

300000
72 -72
155 -49
183 11
184 38
269 -47
339 23
378 39
425 109
520 14
553 47
560 54
616 -2
644 26
677 -7
689 -19
709 62
777 29
837 -31
892 -86
990 -184
1022 -216
1025 -39
1099 -213
1123 -287
1157 -263
1223 -295
1229 -301
1232 -229
1270 -304
1284 -356
1364 -276
1421 -219
1496 -294
1556 -342
1620 -...

output:

YES

result:

ok single line: 'YES'

Test #204:

score: 0
Accepted
time: 301ms
memory: 97876kb

input:

300000
53 -53
152 46
251 145
294 -40
355 127
406 178
437 188
443 203
484 209
560 238
631 162
676 167
749 195
770 216
786 122
872 232
949 318
962 241
979 245
1004 270
1063 228
1112 260
1132 211
1216 156
1315 240
1318 255
1328 262
1375 252
1420 215
1500 170
1553 303
1586 250
1641 325
1682 366
1732 270...

output:

YES

result:

ok single line: 'YES'

Test #205:

score: 0
Accepted
time: 285ms
memory: 98516kb

input:

300000
70 -70
159 -159
278 -87
287 -49
334 -96
341 -103
359 -40
402 -121
454 -26
458 -78
536 56
574 -22
619 18
656 -64
712 -27
746 -86
823 -120
910 -76
915 -71
1014 -163
1063 -121
1107 -77
1132 -170
1219 35
1236 -52
1316 132
1397 51
1490 52
1575 -127
1602 -42
1615 -100
1678 -24
1683 -19
1779 -87
182...

output:

YES

result:

ok single line: 'YES'

Test #206:

score: 0
Accepted
time: 297ms
memory: 101016kb

input:

300000
124 -124
168 -168
266 -46
267 -71
303 -70
354 -35
396 58
466 128
474 16
488 122
554 56
636 138
685 136
747 249
793 187
827 203
866 169
884 112
946 50
1037 -41
1052 -56
1058 130
1073 -50
1171 -65
1267 -163
1341 -333
1401 -393
1429 -259
1433 -361
1463 -331
1467 -365
1556 -327
1599 -238
1643 -15...

output:

YES

result:

ok single line: 'YES'

Test #207:

score: 0
Accepted
time: 315ms
memory: 102852kb

input:

300000
85 -85
94 -76
118 -52
229 -163
291 -225
352 -94
390 -164
463 -202
502 -168
590 -256
616 -129
702 -316
732 -230
737 -281
738 -280
755 -286
769 -283
812 -297
875 -326
918 -346
923 -351
982 -292
999 -389
1028 -304
1054 -330
1055 -275
1122 -329
1177 -207
1205 -262
1254 -228
1312 -286
1407 -381
14...

output:

YES

result:

ok single line: 'YES'

Test #208:

score: 0
Accepted
time: 316ms
memory: 101612kb

input:

300000
57 57
138 52
197 111
253 55
302 14
325 -17
371 6
450 -63
542 16
600 -76
658 -134
709 -243
718 -192
742 -210
799 -234
834 -232
853 -267
878 -213
891 -175
983 -188
1037 -83
1043 -137
1137 -143
1158 -216
1210 -164
1309 -65
1378 4
1422 48
1453 -237
1460 10
1485 17
1562 112
1563 35
1588 136
1631 1...

output:

YES

result:

ok single line: 'YES'

Test #209:

score: 0
Accepted
time: 291ms
memory: 101236kb

input:

300000
67 23
79 11
145 45
197 77
272 25
300 -78
308 -50
391 -86
392 -170
450 -228
545 -133
642 -230
701 -289
793 -381
868 -169
896 -306
900 -278
929 -282
951 -289
1017 -311
1101 -271
1184 -355
1202 -188
1280 -170
1306 -92
1385 -66
1447 75
1468 13
1551 -29
1598 -76
1601 -79
1641 54
1725 -123
1792 -56...

output:

YES

result:

ok single line: 'YES'

Test #210:

score: 0
Accepted
time: 297ms
memory: 99600kb

input:

300000
57 -32
129 65
183 -7
251 -57
289 -19
351 11
437 43
494 14
528 48
551 71
607 127
633 153
731 -43
828 348
880 400
958 251
982 298
1050 366
1147 269
1211 322
1237 205
1260 231
1349 254
1378 314
1436 372
1491 317
1582 408
1679 311
1747 343
1809 243
1904 210
1946 305
2003 309
2016 252
2068 270
215...

output:

YES

result:

ok single line: 'YES'

Test #211:

score: 0
Accepted
time: 44ms
memory: 96088kb

input:

300000
87 -87
121 -53
141 -73
164 -50
248 -134
346 -232
349 -13
416 -302
468 -250
494 -235
548 -276
566 -222
580 -226
602 -248
618 -264
690 -336
753 -399
754 -240
763 -407
817 -398
895 -461
915 -539
1012 -462
1049 -499
1112 -559
1178 -562
1273 -723
1364 -814
1394 -844
1414 -824
1459 -779
1528 -710
1...

output:

NO

result:

ok single line: 'NO'

Test #212:

score: 0
Accepted
time: 55ms
memory: 92796kb

input:

300000
177 99
270 270
290 177
366 326
410 250
497 195
534 158
547 282
573 145
574 172
622 124
633 171
708 60
798 150
826 122
837 135
930 226
951 133
1031 247
1102 327
1149 445
1189 485
1283 398
1330 438
1354 391
1414 414
1511 354
1574 320
1647 393
1672 418
1707 383
1740 416
1755 257
1756 401
1846 49...

output:

NO

result:

ok single line: 'NO'

Test #213:

score: 0
Accepted
time: 43ms
memory: 94064kb

input:

300000
33 33
61 61
125 -3
201 35
270 66
353 149
385 117
430 -3
451 51
474 72
528 128
546 74
567 89
642 164
693 215
772 110
861 136
876 210
879 207
880 225
907 181
988 208
1010 240
1100 262
1141 191
1207 257
1209 259
1289 150
1304 179
1403 263
1489 177
1510 198
1574 134
1597 164
1638 111
1661 152
167...

output:

NO

result:

ok single line: 'NO'

Test #214:

score: 0
Accepted
time: 51ms
memory: 94864kb

input:

300000
63 63
133 -5
222 -94
245 -117
266 -138
336 -208
360 -6
389 -261
429 -221
449 -241
524 -232
572 -268
661 -316
756 -262
793 -357
850 -356
913 -419
993 -299
1074 -339
1159 -343
1224 -278
1269 -258
1303 -233
1361 -199
1448 -141
1505 -111
1508 -54
1570 -46
1596 -108
1630 -54
1678 -6
1688 4
1727 43...

output:

NO

result:

ok single line: 'NO'

Test #215:

score: 0
Accepted
time: 51ms
memory: 94300kb

input:

300000
52 52
170 -66
240 -27
323 87
421 185
514 4
594 278
630 198
722 326
813 234
909 235
954 184
1043 273
1081 139
1113 279
1203 311
1237 403
1278 369
1339 423
1356 440
1406 362
1438 522
1505 490
1580 455
1601 551
1677 530
1763 713
1821 655
1850 626
1923 699
1952 670
2024 627
2044 618
2089 598
2119...

output:

NO

result:

ok single line: 'NO'

Test #216:

score: 0
Accepted
time: 52ms
memory: 93232kb

input:

300000
42 42
51 33
82 64
148 -2
257 -52
288 -111
352 -78
384 -142
449 -175
481 -143
498 -160
500 -110
506 -168
555 -162
621 -119
688 -53
767 14
803 93
870 57
909 29
934 -10
1002 -14
1065 49
1147 131
1206 54
1272 138
1352 58
1376 34
1436 72
1490 40
1588 94
1631 181
1682 138
1690 232
1693 224
1708 206...

output:

NO

result:

ok single line: 'NO'

Test #217:

score: 0
Accepted
time: 45ms
memory: 92372kb

input:

300000
78 78
151 151
156 73
163 139
256 146
283 73
363 153
369 159
408 46
449 222
499 255
513 241
603 151
693 61
716 205
792 38
808 -38
881 -95
917 -131
952 -96
1030 -22
1053 -174
1132 -151
1165 -197
1179 -183
1197 -165
1217 -145
1309 -237
1353 -281
1365 -293
1423 -230
1431 -235
1512 -243
1554 -120
...

output:

NO

result:

ok single line: 'NO'

Test #218:

score: 0
Accepted
time: 54ms
memory: 94332kb

input:

300000
48 48
50 19
116 116
154 78
194 50
285 27
363 118
417 105
510 159
550 66
551 26
617 93
677 27
756 153
811 19
820 74
897 87
973 10
1065 11
1104 -81
1130 -16
1131 -42
1136 -10
1187 -15
1253 -61
1311 5
1340 63
1397 -23
1471 -97
1548 34
1589 -174
1617 -133
1685 -173
1703 -155
1720 -105
1776 -172
1...

output:

NO

result:

ok single line: 'NO'

Test #219:

score: 0
Accepted
time: 53ms
memory: 90704kb

input:

300000
148 148
236 60
270 77
311 94
362 135
441 163
461 84
518 143
540 64
603 86
639 163
704 228
800 127
802 134
831 132
869 105
946 67
1001 199
1095 293
1147 345
1218 144
1227 416
1318 316
1346 407
1398 292
1487 344
1566 124
1586 203
1641 49
1733 104
1747 141
1755 163
1815 155
1863 223
1914 322
191...

output:

NO

result:

ok single line: 'NO'

Test #220:

score: 0
Accepted
time: 47ms
memory: 90684kb

input:

300000
75 75
224 -11
262 -36
283 -74
341 -115
437 -57
495 -211
586 -360
604 -269
608 -338
631 -361
688 -418
708 -342
733 -463
789 -438
832 -519
929 -659
1026 -562
1054 -562
1058 -594
1102 -590
1120 -550
1155 -533
1168 -546
1212 -590
1262 -540
1275 -568
1328 -474
1346 -492
1347 -527
1424 -491
1462 -6...

output:

NO

result:

ok single line: 'NO'

Test #221:

score: 0
Accepted
time: 50ms
memory: 93420kb

input:

300000
99 -99
137 -61
209 -131
225 -129
308 -228
331 -145
361 -205
431 -245
440 -236
443 -175
538 -328
592 -382
611 -363
619 -233
649 -341
666 -371
741 -249
756 -264
853 -324
917 -103
938 -167
992 -136
1025 -82
1095 -239
1108 -226
1173 -169
1185 -303
1238 -356
1291 -291
1346 -409
1383 -501
1384 -464...

output:

NO

result:

ok single line: 'NO'

Test #222:

score: 0
Accepted
time: 50ms
memory: 96036kb

input:

300000
45 45
218 62
288 140
353 197
427 271
452 296
460 132
531 288
573 217
618 175
681 130
688 193
701 200
752 187
793 136
811 195
860 146
953 177
992 53
1071 14
1104 60
1174 93
1195 151
1220 130
1229 126
1259 105
1354 135
1389 165
1445 200
1533 21
1553 1
1585 109
1606 33
1685 54
1703 133
1746 158
...

output:

NO

result:

ok single line: 'NO'

Test #223:

score: 0
Accepted
time: 48ms
memory: 94164kb

input:

300000
63 -63
87 -87
154 -20
262 36
286 62
349 -51
355 12
454 -45
493 54
504 93
557 82
576 135
655 154
741 319
765 233
823 285
844 306
919 381
971 433
1067 343
1163 529
1214 484
1228 433
1275 470
1302 517
1363 429
1387 490
1404 388
1488 472
1506 490
1559 437
1657 535
1736 405
1818 456
1848 538
1897 ...

output:

NO

result:

ok single line: 'NO'

Test #224:

score: 0
Accepted
time: 53ms
memory: 93984kb

input:

300000
94 -94
170 -170
206 -134
234 -114
238 -118
306 -110
385 -186
454 -265
521 -267
548 -334
582 -240
604 -296
631 -269
668 -232
724 -288
809 -373
814 -368
892 -274
985 -446
1030 -586
1052 -539
1148 -662
1165 -566
1249 -561
1329 -481
1377 -645
1396 -548
1490 -529
1541 -454
1613 -475
1655 -403
1682...

output:

NO

result:

ok single line: 'NO'

Test #225:

score: 0
Accepted
time: 45ms
memory: 93852kb

input:

300000
23 -50
107 7
233 -22
268 -154
330 -119
339 -92
419 -83
495 -3
565 143
613 73
669 247
673 191
684 254
694 243
703 244
775 307
820 262
903 235
945 137
1035 179
1064 227
1143 256
1176 368
1229 335
1316 228
1319 315
1336 208
1435 225
1490 307
1570 442
1668 362
1670 540
1768 440
1796 412
1809 538
...

output:

NO

result:

ok single line: 'NO'

Test #226:

score: 0
Accepted
time: 46ms
memory: 94352kb

input:

300000
64 -64
85 -65
175 -85
177 7
238 5
277 -54
356 -15
380 -94
429 -70
430 -118
510 -198
528 -119
617 -269
699 -180
752 -187
828 -58
841 -45
912 26
1007 -134
1008 121
1107 23
1178 -48
1253 27
1283 57
1351 122
1399 -59
1455 -3
1535 -83
1572 -46
1629 -11
1644 -88
1678 -103
1679 -54
1699 -55
1729 -65...

output:

NO

result:

ok single line: 'NO'

Test #227:

score: 0
Accepted
time: 45ms
memory: 91472kb

input:

300000
108 -68
164 -108
240 -164
268 -240
357 -268
429 -429
466 -357
561 -392
639 -297
696 -375
697 -318
704 -317
717 -323
741 -299
763 -310
791 -249
859 -277
928 -112
1027 -13
1031 -181
1123 -17
1204 -109
1246 -70
1307 -9
1331 15
1429 -83
1445 -99
1480 -28
1531 -134
1553 -83
1610 -105
1627 -31
1665...

output:

NO

result:

ok single line: 'NO'

Test #228:

score: 0
Accepted
time: 51ms
memory: 94136kb

input:

300000
66 1
81 -79
105 -55
134 -26
176 -64
226 -68
303 -41
391 -118
475 -37
534 47
571 22
644 -15
735 -88
793 3
800 -48
875 -55
962 -123
989 -36
1058 -9
1126 -146
1155 -117
1224 -78
1280 -186
1307 -242
1406 -116
1426 -136
1508 -215
1525 -218
1572 -201
1619 -248
1652 -201
1723 -239
1771 -168
1835 -19...

output:

NO

result:

ok single line: 'NO'

Test #229:

score: 0
Accepted
time: 47ms
memory: 91400kb

input:

300000
40 40
74 15
89 6
163 95
188 120
260 21
303 235
310 228
402 192
440 358
454 320
541 372
580 285
675 246
687 353
749 415
835 501
898 438
916 341
995 341
1040 296
1068 324
1102 420
1162 290
1184 350
1242 328
1297 270
1347 215
1382 165
1457 130
1547 55
1608 206
1614 145
1680 146
1767 233
1850 150...

output:

NO

result:

ok single line: 'NO'

Test #230:

score: 0
Accepted
time: 47ms
memory: 93844kb

input:

300000
104 80
130 -12
164 140
236 106
256 192
339 212
397 109
441 123
468 96
503 131
518 146
551 113
643 167
683 165
742 205
762 204
841 283
914 210
974 224
977 150
1043 153
1074 188
1126 240
1190 304
1242 219
1250 252
1346 260
1370 140
1443 67
1536 164
1562 160
1604 92
1673 161
1686 134
1736 174
17...

output:

NO

result:

ok single line: 'NO'

Subtask #8:

score: 0
Memory Limit Exceeded

Dependency #7:

100%
Accepted

Test #231:

score: 0
Memory Limit Exceeded

input:

1000000
85 -85
138 -104
161 -68
207 -35
242 -81
258 16
275 0
325 33
346 62
442 83
468 -60
509 -34
516 -94
518 -101
554 -132
641 -96
706 -219
753 -284
826 -237
854 -310
935 -338
965 -449
1037 -521
1050 -508
1084 -474
1093 -419
1142 -416
1143 -415
1178 -380
1261 -465
1262 -296
1271 -305
1295 -297
1360...

output:


result: