QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#88999#4906. 球球zhouhuanyi50 520ms60912kbC++233.7kb2023-03-18 10:21:232023-03-18 10:21:24

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-18 10:21:24]
  • 评测
  • 测评结果:50
  • 用时:520ms
  • 内存:60912kb
  • [2023-03-18 10:21:23]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<vector>
#include<set>
#include<map>
#define N 1000000
#define inf 1e18
#define INF 1e9
using namespace std;
int read()
{
    char c=0;
    int sum=0,f=1;
    while (c!='-'&&(c<'0'||c>'9')) c=getchar();
    if (c=='-') c=getchar(),f=-1;
    while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
    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;
    }
};
int n,L[N+1],lst[N+1],nt[N+1];
long long dp[N+1][2];
set<node>s;
map<int,int>p;
vector<node>v[N+1];
void adder(int l,int r,int d)
{
    if (l>r) return;
    int L,R,ds;
    for (auto it=s.lower_bound((node){0,l,0});(*it).l<=r&&it!=s.end();it=s.lower_bound((node){0,l,0}))
    {
	L=(*it).l,R=(*it).r,ds=(*it).d,s.erase(it);
	if (L<=l-1) s.insert((node){L,l-1,ds});
	if (r+1<=R) s.insert((node){r+1,R,ds});
    }
    s.insert((node){l,r,d});
    return;
}
int query(int x)
{
    auto it=s.lower_bound((node){0,x,0});
    return (*it).d;
}
int main()
{
    long long d,l,r,sl,sr,ps,ps2;
    n=read(),s.insert((node){(int)(-INF),(int)(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)),p[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) p[st[i-1].x]=max(p[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);
    }
    s.clear(),s.insert((node){(int)(-INF),(int)(INF),0}),dp[0][0]=0;
    for (int i=0;i<=n;++i)
    {
	for (int j=0;j<v[i].size();++j) adder(v[i][j].l,v[i][j].r,v[i][j].d);
	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 (query(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,l),sr=min(max(st[i].x,st[ps].x)+d,r);
		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,l),sr=min(max(st[lst[i]].x,st[ps].x)+d,r);
		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((node){st[ps2].x,st[ps2].x,i+1});
	    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((node){st[ps2].x,st[ps2].x,i+1});
	}
    }
    puts((dp[n][0]!=inf||dp[n][1]!=inf)?"YES":"NO");
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 6ms
memory: 26728kb

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: 0ms
memory: 26836kb

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: 1ms
memory: 26844kb

input:

4
16 13
18 4
20 3
21 5

output:

NO

result:

ok single line: 'NO'

Test #4:

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

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: 0ms
memory: 26744kb

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: 12ms
memory: 26776kb

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: 5ms
memory: 26900kb

input:

3
1 0
5 5
6 2

output:

YES

result:

ok single line: 'YES'

Test #8:

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

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: 4ms
memory: 26748kb

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: 8ms
memory: 26780kb

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: 0ms
memory: 26872kb

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: 26736kb

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: 6ms
memory: 26760kb

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: 7ms
memory: 26780kb

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: 8ms
memory: 26740kb

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: 4ms
memory: 26756kb

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: 3ms
memory: 26676kb

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: 10ms
memory: 26840kb

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: 1ms
memory: 26728kb

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: 4ms
memory: 26904kb

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: 26728kb

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: 26800kb

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: 5ms
memory: 26800kb

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: 1ms
memory: 26912kb

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: 26696kb

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: 12ms
memory: 26736kb

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: 1ms
memory: 26800kb

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: 4ms
memory: 26756kb

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: 4ms
memory: 26912kb

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: 26904kb

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: 4ms
memory: 26760kb

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: 3ms
memory: 26836kb

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: 8ms
memory: 26760kb

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: 1ms
memory: 26752kb

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: 5ms
memory: 26796kb

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: 3ms
memory: 26672kb

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: 3ms
memory: 26776kb

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: 6ms
memory: 26904kb

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: 1ms
memory: 26788kb

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: 1ms
memory: 26792kb

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: 7ms
memory: 26728kb

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: 26760kb

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: 26724kb

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: 1ms
memory: 26752kb

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: 11ms
memory: 26668kb

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: 26760kb

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: 7ms
memory: 26908kb

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: 5ms
memory: 26872kb

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: 3ms
memory: 26664kb

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: 4ms
memory: 26744kb

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: 12ms
memory: 27296kb

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: 9ms
memory: 27388kb

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: 6ms
memory: 27224kb

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: 6ms
memory: 27224kb

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: 19ms
memory: 27300kb

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: 11ms
memory: 27180kb

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: 2ms
memory: 27196kb

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: 5ms
memory: 27356kb

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: 8ms
memory: 27184kb

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: 27216kb

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: 11ms
memory: 27432kb

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: 3ms
memory: 27192kb

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: 8ms
memory: 27248kb

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: 11ms
memory: 27228kb

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: 8ms
memory: 27208kb

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: 7ms
memory: 27200kb

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: 8ms
memory: 27256kb

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: 8ms
memory: 27284kb

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: 7ms
memory: 27280kb

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: 27196kb

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: 12ms
memory: 27308kb

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: 11ms
memory: 27272kb

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: 8ms
memory: 27308kb

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: 8ms
memory: 27308kb

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: 14ms
memory: 27300kb

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: 10ms
memory: 27380kb

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: 7ms
memory: 27272kb

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: 12ms
memory: 27428kb

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: 13ms
memory: 27504kb

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: 14ms
memory: 27244kb

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: 15ms
memory: 27344kb

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: 11ms
memory: 27376kb

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: 15ms
memory: 27316kb

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: 16ms
memory: 27488kb

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: 14ms
memory: 27344kb

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: 10ms
memory: 27260kb

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: 3ms
memory: 27316kb

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: 14ms
memory: 27376kb

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: 6ms
memory: 27384kb

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: 10ms
memory: 27340kb

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: 0
Wrong Answer

Test #91:

score: 20
Accepted
time: 8ms
memory: 27156kb

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: 27292kb

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: -20
Wrong Answer
time: 8ms
memory: 27232kb

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:

NO

result:

wrong answer 1st lines differ - expected: 'YES', found: 'NO'

Subtask #5:

score: 20
Accepted

Dependency #3:

100%
Accepted

Test #151:

score: 20
Accepted
time: 148ms
memory: 38136kb

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: 168ms
memory: 38276kb

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: 160ms
memory: 38156kb

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: 172ms
memory: 38056kb

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: 159ms
memory: 38148kb

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: 177ms
memory: 38124kb

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: 185ms
memory: 38344kb

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: 184ms
memory: 38264kb

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: 176ms
memory: 38212kb

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: 176ms
memory: 38120kb

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: 45ms
memory: 35740kb

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: 45ms
memory: 35784kb

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: 46ms
memory: 35784kb

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: 35ms
memory: 35720kb

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: 53ms
memory: 35792kb

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: 43ms
memory: 35764kb

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: 41ms
memory: 35712kb

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: 42ms
memory: 35724kb

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: 33ms
memory: 35836kb

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: 204ms
memory: 35912kb

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: 500ms
memory: 60788kb

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: 520ms
memory: 60780kb

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: 478ms
memory: 60876kb

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: 513ms
memory: 60732kb

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: 501ms
memory: 60804kb

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: 506ms
memory: 60796kb

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: 509ms
memory: 60780kb

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: 501ms
memory: 60776kb

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: 512ms
memory: 60912kb

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: 455ms
memory: 60784kb

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: 107ms
memory: 53628kb

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: 118ms
memory: 53628kb

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: 124ms
memory: 53684kb

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: 132ms
memory: 53656kb

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: 125ms
memory: 53768kb

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: 119ms
memory: 53884kb

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: 127ms
memory: 53688kb

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: 129ms
memory: 53688kb

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: 125ms
memory: 53868kb

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: 142ms
memory: 53864kb

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: 0
Skipped

Dependency #4:

0%

Subtask #8:

score: 0
Skipped

Dependency #7:

0%