QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#133705#4940. Token Distancewhsyhyyh#AC ✓175ms39448kbC++143.2kb2023-08-02 13:11:312023-08-02 13:11:33

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-02 13:11:33]
  • 评测
  • 测评结果:AC
  • 用时:175ms
  • 内存:39448kb
  • [2023-08-02 13:11:31]
  • 提交

answer

#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
#pragma GCC option("arch=native","tune=native","no-zero-upper")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2")
#pragma GCC optimize(3)
#include<bits/stdc++.h>
#define N 200010
#define inf 0x3f3f3f3f
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define drep(i,r,l) for(int i=r;i>=l;i--)
using namespace std;
int rd() {
	int res=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9') {if(ch=='-') f*=-1;ch=getchar();}
	while(ch>='0'&&ch<='9') res=(res<<1)+(res<<3)+(ch^48),ch=getchar();
	return res*f;
}
struct qry {
	int opt,x,y;
}q[N];
int n,Q,a[N],m;
int b[N],tot;
unordered_map<int,int>mp;
set<int>S[N];
set<int>::iterator it;
struct node {
	int d,mx,mn,s1,s0;
};
struct Seg {
	int d[N<<2],mx[N<<2],mn[N<<2],Same[N<<2][2];
	void update(int p) {
		mx[p]=max(mx[p<<1],mx[p<<1|1]);
		mn[p]=min(mn[p<<1],mn[p<<1|1]);
		d[p]=__gcd(d[p<<1],d[p<<1|1]);
		Same[p][1]=min(Same[p<<1][1],Same[p<<1|1][1]);
		Same[p][0]=max(Same[p<<1][0],Same[p<<1][0]);
	}
	void init(int p,int l) {
		mn[p]=mx[p]=a[l],d[p]=abs(a[l]-a[l+1]);
		int tmp=mp[a[l]];
		it=S[tmp].upper_bound(l);
		if(it!=S[tmp].end()) Same[p][1]=*it;else Same[p][1]=inf;
		it--;if(it!=S[tmp].begin()) it--,Same[p][0]=*it;else Same[p][0]=0;
	}
	void build(int p,int l,int r) {
		if(l==r) {
			init(p,l);
			return ;
		}
		int mid=l+r>>1;
		build(p<<1,l,mid),build(p<<1|1,mid+1,r);
		update(p);
	}
	void modify(int p,int l,int r,int x) {
		if(l==r) {
			init(p,l);
			return ;
		}
		int mid=l+r>>1;
		if(x<=mid) modify(p<<1,l,mid,x);
		else modify(p<<1|1,mid+1,r,x);
		update(p);
	}
	node gets(int p,int l,int r,int L,int R) {
		if(l>=L&&r<=R) return (node) {d[p],mx[p],mn[p],Same[p][1],Same[p][0]};
		int mid=l+r>>1;
		if(R<=mid) return gets(p<<1,l,mid,L,R);
		if(L>mid) return gets(p<<1|1,mid+1,r,L,R);
		node A=gets(p<<1,l,mid,L,R),B=gets(p<<1|1,mid+1,r,L,R);
		return (node) {__gcd(A.d,B.d),max(A.mx,B.mx),min(A.mn,B.mn),min(A.s1,B.s1),max(A.s0,B.s0)};
	}
}T;
bool check(int l,int r) {
	if(r-l+1<=2) return 1;
	node tmp=T.gets(1,1,n,l,r);
	if(tmp.mn==tmp.mx) return 1;
	if(tmp.s1<=r||tmp.s0>=l) return 0;
	if((tmp.mx-tmp.mn)%(r-l)) return 0;
	int d=(tmp.mx-tmp.mn)/(r-l);
	return T.gets(1,1,n,l,r-1).d==d;
}
int main() {
	n=rd(),Q=rd();
	rep(i,1,n) a[i]=rd(),b[++m]=a[i];
	rep(i,1,Q) {
		q[i].opt=rd(),q[i].x=rd(),q[i].y=rd();
		if(q[i].opt==1) b[++m]=q[i].y;
	}
	b[0]=-1;sort(b+1,b+m+1);rep(i,1,m) if(b[i]!=b[i-1]) mp[b[i]]=++tot;
	rep(i,1,n) S[mp[a[i]]].insert(i);
	T.build(1,1,n);
	rep(i,1,Q) {
		if(q[i].opt==1) {
			int tmp=mp[a[q[i].x]];
			S[tmp].erase(q[i].x);
			it=S[tmp].upper_bound(q[i].x);
			if(it!=S[tmp].end()) T.modify(1,1,n,*it);
			if(it!=S[tmp].begin()) it--,T.modify(1,1,n,*it);
			
			a[q[i].x]=q[i].y;
			tmp=mp[a[q[i].x]];
			S[tmp].insert(q[i].x);
			it=S[tmp].upper_bound(q[i].x);
			if(it!=S[tmp].end()) T.modify(1,1,n,*it);
			it--;if(it!=S[tmp].begin()) it--,T.modify(1,1,n,*it);
			
			T.modify(1,1,n,q[i].x);
			if(q[i].x!=1) T.modify(1,1,n,q[i].x-1);
		}
		else {
			if(check(q[i].x,q[i].y)) puts("YES");
			else puts("NO");
		}
	}
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 21948kb

input:

5 7
1 1 1 10 1
2 1 3
2 1 5
1 5 4
1 3 7
2 2 4
2 2 5
2 4 5

output:

YES
NO
NO
YES
YES

result:

ok 5 lines

Test #2:

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

input:

2 1
0 1000000000
2 1 2

output:

YES

result:

ok single line: 'YES'

Test #3:

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

input:

81473 13549
972586683 972586964 972587245 972587526 972587807 972588088 972588369 972588650 972588931 972589212 972589493 972589774 972590055 972590336 972590617 972590898 972591179 972591460 972591741 972592022 972592303 972592584 972592865 972593146 972593427 972593708 972593989 972594270 97259455...

output:

YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
Y...

result:

ok 4517 lines

Test #4:

score: 0
Accepted
time: 33ms
memory: 35276kb

input:

81473 13549
994993061 993089286 973546017 983608065 980300695 994305454 992559601 974765838 987574661 988923180 987601637 991357764 981678157 994388630 987066613 976087381 985770922 989296067 975698758 977548300 992236732 978102432 983875296 979745439 977111907 992622264 988921213 987697458 99145442...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 4517 lines

Test #5:

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

input:

81473 13549
972586964 972586683 972587526 972587245 972588088 972587807 972588650 972588369 972589212 972588931 972589774 972589493 972590336 972590055 972590898 972590617 972591460 972591179 972592022 972591741 972592584 972592303 972593146 972592865 972593708 972593427 972594270 972593989 97259483...

output:

NO
NO
YES
YES
NO
NO
YES
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
YES
NO
NO
NO
YES
NO
NO
NO
YES
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES...

result:

ok 13549 lines

Test #6:

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

input:

81473 13549
136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 13635105...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 13549 lines

Test #7:

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

input:

81473 13549
136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 136351051 13635105...

output:

YES
NO
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO...

result:

ok 6727 lines

Test #8:

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

input:

96888 91338
0 10321 20642 30963 41284 51605 61926 72247 82568 92889 103210 113531 123852 134173 144494 154815 165136 175457 185778 196099 206420 216741 227062 237383 247704 258025 268346 278667 288988 299309 309630 319951 330272 340593 350914 361235 371556 381877 392198 402519 412840 423161 433482 4...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 91338 lines

Test #9:

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

input:

96888 91338
0 10321 20642 30963 41284 51605 61926 72247 82568 92889 103210 113531 123852 134173 144494 154815 165136 175457 185778 196099 206420 216741 227062 237383 247704 258025 268346 278667 288988 299309 309630 319951 330272 340593 350914 361235 371556 381877 392198 402519 412840 423161 433482 4...

output:

NO
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
NO
NO
YES
YES
YES
NO
NO
YES
YES
NO
YES
NO
YES
YES
NO
NO
YES
YES
NO
NO
NO
NO
YES
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
NO
NO
YES
YES
YES
NO
NO
NO
NO
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YE...

result:

ok 91338 lines

Test #10:

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

input:

96888 91338
0 10321 20642 30963 41284 51605 61926 72247 82568 92889 103210 113531 123852 134173 144494 154815 165136 175457 185778 196099 206420 216741 227062 237383 247704 258025 268346 278667 288988 299309 309630 319951 330272 340593 350914 361235 371556 381877 392198 402519 412840 423161 433482 4...

output:

YES
YES
NO
NO
NO
NO
YES
NO
YES
YES
NO
NO
YES
NO
NO
NO
NO
YES
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
N...

result:

ok 45670 lines

Test #11:

score: 0
Accepted
time: 102ms
memory: 38616kb

input:

96888 91338
148622400 313851289 796564459 844340368 558593162 622118917 828177682 162586713 809187042 120384144 635536217 253999810 681392420 868894027 212922230 762102640 996956995 352833706 345175524 294127858 22179829 707700649 122520591 837858780 906906270 596853109 3416251 593901303 130684502 8...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 45670 lines

Test #12:

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

input:

96888 91338
0 10321 20642 30963 41284 51605 61926 72247 82568 92889 103210 113531 123852 134173 144494 154815 165136 175457 185778 196099 206420 216741 227062 237383 247704 258025 268346 278667 288988 299309 309630 319951 330272 340593 350914 361235 371556 381877 392198 402519 412840 423161 433482 4...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YE...

result:

ok 45670 lines

Test #13:

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

input:

81473 13549
972586683 972586964 972587245 972587526 972587807 972588088 972588369 972588650 972588931 972589212 972589493 972589774 972590055 972590336 972590617 972590898 972591179 972591460 972591741 972592022 972592303 972592584 972592865 972593146 972593427 972593708 972593989 972594270 97259455...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 13549 lines

Test #14:

score: 0
Accepted
time: 76ms
memory: 38348kb

input:

96888 91338
595841651 917330480 207421137 35297820 388823033 754743767 175477642 575292540 427299721 685520820 420849096 990712790 335515068 880143917 298720703 665301981 644711586 983560337 804026542 699918615 863609675 666912057 857974409 277769073 133161542 363784287 536671358 866138320 98617155 ...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 45670 lines

Test #15:

score: 0
Accepted
time: 78ms
memory: 38352kb

input:

96888 91338
0 10321 20642 30963 41284 51605 61926 72247 82568 92889 103210 113531 123852 134173 144494 154815 165136 175457 185778 196099 206420 216741 227062 237383 247704 258025 268346 278667 288988 299309 309630 319951 330272 340593 350914 361235 371556 381877 392198 402519 412840 423161 433482 4...

output:

NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YE...

result:

ok 30446 lines

Test #16:

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

input:

96888 91338
509186535 219424460 517598150 635835526 539550917 500630426 813821171 353246546 400661220 590412805 346537896 453484098 10991865 684901560 100299478 958469986 846580025 936042453 885531479 332171064 822779799 75591004 655115154 686367142 992002915 202559946 242419648 534978714 132769344 ...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 30446 lines

Test #17:

score: 0
Accepted
time: 101ms
memory: 37564kb

input:

96888 91338
0 10321 20642 30963 41284 51605 61926 72247 82568 92889 103210 113531 123852 134173 144494 154815 165136 175457 185778 196099 206420 216741 227062 237383 247704 258025 268346 278667 288988 299309 309630 319951 330272 340593 350914 361235 371556 381877 392198 402519 412840 423161 433482 4...

output:

YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YE...

result:

ok 30446 lines

Test #18:

score: 0
Accepted
time: 110ms
memory: 37608kb

input:

96888 91338
17814046 703974768 403530458 305635773 465157149 240293522 124729285 319641370 532161081 262070832 362535446 68201168 249148940 223748959 999753986 125544644 20218839 382723322 5274031 883343427 539984399 956044551 312623090 985985772 831181093 265538688 200082906 7720108 941636435 45280...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 30446 lines

Test #19:

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

input:

96888 91338
10321 0 30963 20642 51605 41284 72247 61926 92889 82568 113531 103210 134173 123852 154815 144494 175457 165136 196099 185778 216741 206420 237383 227062 258025 247704 278667 268346 299309 288988 319951 309630 340593 330272 361235 350914 381877 371556 402519 392198 423161 412840 443803 4...

output:

YES
YES
YES
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
YES
NO
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO...

result:

ok 91338 lines

Test #20:

score: 0
Accepted
time: 58ms
memory: 33700kb

input:

96888 91338
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 91338 lines

Test #21:

score: 0
Accepted
time: 175ms
memory: 36548kb

input:

96888 91338
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10...

output:

YES
YES
NO
YES
NO
NO
YES
YES
YES
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
Y...

result:

ok 45523 lines

Test #22:

score: 0
Accepted
time: 71ms
memory: 37900kb

input:

100000 100000
237333496 237338319 237343142 237347965 237352788 237357611 237362434 237367257 237372080 237376903 237381726 237386549 237391372 237396195 237401018 237405841 237410664 237415487 237420310 237425133 237429956 237434779 237439602 237444425 237449248 237454071 237458894 237463717 237468...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 100000 lines

Test #23:

score: 0
Accepted
time: 70ms
memory: 37852kb

input:

100000 100000
237333496 237338319 237343142 237347965 237352788 237357611 237362434 237367257 237372080 237376903 237381726 237386549 237391372 237396195 237401018 237405841 237410664 237415487 237420310 237425133 237429956 237434779 237439602 237444425 237449248 237454071 237458894 237463717 237468...

output:

YES
YES
YES
YES
NO
YES
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
NO
NO
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
NO
NO
YES
YES
YES
NO
NO
NO
YES
NO
YES
YES
NO
YES
NO...

result:

ok 100000 lines

Test #24:

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

input:

81473 13549
972586683 972586964 972587245 972587526 972587807 972588088 972588369 972588650 972588931 972589212 972589493 972589774 972590055 972590336 972590617 972590898 972591179 972591460 972591741 972592022 972592303 972592584 972592865 972593146 972593427 972593708 972593989 972594270 97259455...

output:

NO
NO
NO
NO
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
NO
YES
NO
YES
NO
NO
NO
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
NO
NO
NO
YES
YES
NO
YES
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
N...

result:

ok 13549 lines

Test #25:

score: 0
Accepted
time: 93ms
memory: 37956kb

input:

100000 100000
237333496 237338319 237343142 237347965 237352788 237357611 237362434 237367257 237372080 237376903 237381726 237386549 237391372 237396195 237401018 237405841 237410664 237415487 237420310 237425133 237429956 237434779 237439602 237444425 237449248 237454071 237458894 237463717 237468...

output:

YES
NO
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
N...

result:

ok 50000 lines

Test #26:

score: 0
Accepted
time: 91ms
memory: 35764kb

input:

100000 100000
388433263 610816970 714897310 316831005 342315737 270506090 367298877 543415545 414472640 264675083 718635135 372387142 350842801 257102973 629703838 597650180 264530393 385968710 537922148 570318239 263662253 257131911 707358961 489248432 394794800 608164320 554272118 272951351 573458...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 50000 lines

Test #27:

score: 0
Accepted
time: 102ms
memory: 38748kb

input:

100000 100000
237333496 237338319 237343142 237347965 237352788 237357611 237362434 237367257 237372080 237376903 237381726 237386549 237391372 237396195 237401018 237405841 237410664 237415487 237420310 237425133 237429956 237434779 237439602 237444425 237449248 237454071 237458894 237463717 237468...

output:

YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
...

result:

ok 50000 lines

Test #28:

score: 0
Accepted
time: 97ms
memory: 37568kb

input:

100000 100000
411419681 674340703 323231126 543048997 332843365 432375616 572551288 389552199 517988689 336045837 276616831 570323062 317607508 696955750 698431588 327600764 496579392 480615262 299632187 460242910 472507799 251397364 296087282 314742646 385134331 433417384 459558044 604990786 368991...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 50000 lines

Test #29:

score: 0
Accepted
time: 89ms
memory: 38912kb

input:

100000 100000
237333496 237338319 237343142 237347965 237352788 237357611 237362434 237367257 237372080 237376903 237381726 237386549 237391372 237396195 237401018 237405841 237410664 237415487 237420310 237425133 237429956 237434779 237439602 237444425 237449248 237454071 237458894 237463717 237468...

output:

YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES...

result:

ok 33336 lines

Test #30:

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

input:

100000 100000
509832996 398392758 306611068 638394884 572531996 314332691 561767060 359432564 626892029 661878071 629766537 597037659 645393057 623641327 532491450 329515495 248995510 568398685 633470601 434734063 371957895 590492848 619628591 711337936 658844404 592233951 452796198 333533054 308689...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 33336 lines

Test #31:

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

input:

100000 100000
237333496 237338319 237343142 237347965 237352788 237357611 237362434 237367257 237372080 237376903 237381726 237386549 237391372 237396195 237401018 237405841 237410664 237415487 237420310 237425133 237429956 237434779 237439602 237444425 237449248 237454071 237458894 237463717 237468...

output:

NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YE...

result:

ok 33336 lines

Test #32:

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

input:

100000 100000
301903820 346733605 354016335 670998364 262991856 687734174 367009497 271938521 684927188 305468017 558009943 520525587 690666558 388467024 393068166 429583099 529911145 522020717 247355690 301161078 561849051 533581448 407638449 488626265 571798900 443791657 619223459 621784472 689185...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 33336 lines

Test #33:

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

input:

100000 100000
237338319 237333496 237347965 237343142 237357611 237352788 237367257 237362434 237376903 237372080 237386549 237381726 237396195 237391372 237405841 237401018 237415487 237410664 237425133 237420310 237434779 237429956 237444425 237439602 237454071 237449248 237463717 237458894 237473...

output:

YES
YES
NO
NO
NO
YES
NO
NO
NO
YES
NO
YES
YES
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
YES
NO
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
YES
NO
NO
NO
YES
YES
YES
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
YES
YES
NO
...

result:

ok 100000 lines

Test #34:

score: 0
Accepted
time: 68ms
memory: 33732kb

input:

100000 100000
330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 100000 lines

Test #35:

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

input:

81473 13549
972586683 972586964 972587245 972587526 972587807 972588088 972588369 972588650 972588931 972589212 972589493 972589774 972590055 972590336 972590617 972590898 972591179 972591460 972591741 972592022 972592303 972592584 972592865 972593146 972593427 972593708 972593989 972594270 97259455...

output:

YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
YES
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO...

result:

ok 6775 lines

Test #36:

score: 0
Accepted
time: 164ms
memory: 36800kb

input:

100000 100000
330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891850 330891...

output:

YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO...

result:

ok 50011 lines

Test #37:

score: 0
Accepted
time: 77ms
memory: 37880kb

input:

100000 100000
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 110000 120000 130000 140000 150000 160000 170000 180000 190000 200000 210000 220000 230000 240000 250000 260000 270000 280000 290000 300000 310000 320000 330000 340000 350000 360000 370000 380000 390000 400000 410000 420000...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 100000 lines

Test #38:

score: 0
Accepted
time: 64ms
memory: 37808kb

input:

100000 100000
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 110000 120000 130000 140000 150000 160000 170000 180000 190000 200000 210000 220000 230000 240000 250000 260000 270000 280000 290000 300000 310000 320000 330000 340000 350000 360000 370000 380000 390000 400000 410000 420000...

output:

NO
YES
YES
YES
NO
YES
NO
NO
NO
NO
YES
YES
NO
YES
NO
YES
NO
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
YES
YES
NO
YES
NO
YES
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
YES
YES
YES
NO
NO
YES
NO...

result:

ok 100000 lines

Test #39:

score: 0
Accepted
time: 98ms
memory: 37960kb

input:

100000 100000
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 110000 120000 130000 140000 150000 160000 170000 180000 190000 200000 210000 220000 230000 240000 250000 260000 270000 280000 290000 300000 310000 320000 330000 340000 350000 360000 370000 380000 390000 400000 410000 420000...

output:

YES
YES
YES
YES
NO
YES
YES
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
N...

result:

ok 50000 lines

Test #40:

score: 0
Accepted
time: 101ms
memory: 37804kb

input:

100000 100000
778130000 824000000 575720000 49570000 995500000 799270000 926320000 791320000 658890000 858940000 65130000 403650000 978060000 156870000 931250000 655730000 435500000 463300000 619020000 320360000 1940000 559740000 156260000 314820000 288710000 992550000 860520000 690460000 549190000 ...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 50000 lines

Test #41:

score: 0
Accepted
time: 93ms
memory: 38708kb

input:

100000 100000
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 110000 120000 130000 140000 150000 160000 170000 180000 190000 200000 210000 220000 230000 240000 250000 260000 270000 280000 290000 300000 310000 320000 330000 340000 350000 360000 370000 380000 390000 400000 410000 420000...

output:

NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
...

result:

ok 50000 lines

Test #42:

score: 0
Accepted
time: 79ms
memory: 36660kb

input:

100000 100000
257090000 205680000 72670000 742060000 408720000 995770000 465870000 607410000 719040000 734160000 451180000 456680000 135810000 447890000 398620000 442320000 850440000 137590000 943470000 876710000 371430000 245120000 138640000 214520000 305220000 983390000 531570000 894830000 1328500...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 50000 lines

Test #43:

score: 0
Accepted
time: 87ms
memory: 38612kb

input:

100000 100000
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 110000 120000 130000 140000 150000 160000 170000 180000 190000 200000 210000 220000 230000 240000 250000 260000 270000 280000 290000 300000 310000 320000 330000 340000 350000 360000 370000 380000 390000 400000 410000 420000...

output:

YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YE...

result:

ok 33336 lines

Test #44:

score: 0
Accepted
time: 93ms
memory: 38896kb

input:

100000 100000
509690000 788900000 100040000 913870000 953860000 364370000 483530000 346940000 266740000 323860000 129240000 661780000 140300000 684790000 612950000 999120000 185450000 581930000 860960000 686950000 53370000 314740000 745320000 456900000 211370000 230950000 844560000 393790000 9916500...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 33336 lines

Test #45:

score: 0
Accepted
time: 102ms
memory: 37848kb

input:

100000 100000
0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000 110000 120000 130000 140000 150000 160000 170000 180000 190000 200000 210000 220000 230000 240000 250000 260000 270000 280000 290000 300000 310000 320000 330000 340000 350000 360000 370000 380000 390000 400000 410000 420000...

output:

NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
NO
YES
N...

result:

ok 33336 lines

Test #46:

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

input:

81473 13549
991415088 987109887 981742506 988994554 981769482 982209528 983207359 973972294 986642584 985616372 974528112 972739266 985217633 995107709 991939153 990979257 975838415 995468513 975257588 981803483 976567891 987096680 976102836 986251713 983202863 988246251 978247147 984306350 98349566...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 6775 lines

Test #47:

score: 0
Accepted
time: 120ms
memory: 37904kb

input:

100000 100000
854010000 950590000 116980000 419300000 957970000 414860000 226620000 719070000 964780000 846990000 607830000 198400000 833940000 854000000 258340000 564860000 254410000 746240000 370900000 629990000 790240000 249440000 902930000 696840000 908680000 489700000 79680000 975430000 8918100...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 33336 lines

Test #48:

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

input:

100000 100000
10000 0 30000 20000 50000 40000 70000 60000 90000 80000 110000 100000 130000 120000 150000 140000 170000 160000 190000 180000 210000 200000 230000 220000 250000 240000 270000 260000 290000 280000 310000 300000 330000 320000 350000 340000 370000 360000 390000 380000 410000 400000 430000...

output:

NO
NO
YES
NO
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
YES
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
...

result:

ok 100000 lines

Test #49:

score: 0
Accepted
time: 65ms
memory: 33884kb

input:

100000 100000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 100000 lines

Test #50:

score: 0
Accepted
time: 160ms
memory: 35576kb

input:

100000 100000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...

output:

YES
YES
YES
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 50130 lines

Test #51:

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

input:

100000 100000
604610671 604610810 604610949 604611088 604611227 604611366 604611505 604611644 604611783 604611922 604612061 604612200 604612339 604612478 604612617 604612756 604612895 604613034 604613173 604613312 604613451 604613590 604613729 604613868 604614007 604614146 604614285 604614424 604614...

output:

YES
YES
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
NO
NO
NO
YES
YES
YES
YES
NO
YES
NO
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
YES
N...

result:

ok 100000 lines

Test #52:

score: 0
Accepted
time: 63ms
memory: 37952kb

input:

100000 100000
545567867 534637808 525624608 509717087 519166961 509783909 521017775 542280380 526992128 546415574 509811104 539287376 518476985 539130422 511701545 512446688 541531352 541145183 527806424 530567882 542382167 522149087 541490948 521335568 535487846 547682861 538929179 522152972 512895...

output:

YES
NO
YES
NO
NO
YES
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
YES
YES
NO
NO
YES
NO
YES
NO
YES
YES
YES
YES
NO
NO
YES
NO
YES
YES
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
NO
YES
NO
YES
YES
NO
YES
YES
NO
NO
YES
YES
YES
NO
YES
NO
Y...

result:

ok 100000 lines

Test #53:

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

input:

100000 100000
966703742 966703854 966703966 966704078 966704190 966704302 966704414 966704526 966704638 966704750 966704862 966704974 966705086 966705198 966705310 966705422 966705534 966705646 966705758 966705870 966705982 966706094 966706206 966706318 966706430 966706542 966706654 966706766 966706...

output:

YES
NO
NO
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
NO
NO
NO
NO
YES
YES
NO
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
NO
YES
NO
YES
YES
NO
YES...

result:

ok 100000 lines

Test #54:

score: 0
Accepted
time: 65ms
memory: 37996kb

input:

100000 100000
558999512 453061223 485629289 483647495 445756646 471519968 220174121 578440385 506578430 489014123 346877402 215281019 523037843 535340750 609772022 322026056 298428677 266246447 228951890 491881586 239781605 478307174 540339080 214272584 241570481 281101133 541645661 468757733 432550...

output:

YES
NO
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
NO
YES
NO
YES
NO
YES
YES
NO
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
NO
NO
NO
YES
NO
YES
NO
YES
YES
NO
NO
YES
NO
NO
NO
YES
YES
YES
N...

result:

ok 100000 lines

Test #55:

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

input:

100000 100000
127912471 127925365 127938259 127951153 127964047 127976941 127989835 128002729 128015623 128028517 128041411 128054305 128067199 128080093 128092987 128105881 128118775 128131669 128144563 128157457 128170351 128183245 128196139 128209033 128221927 128234821 128247715 128260609 128273...

output:

NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
YES
YES
YES
YES
YES
YES
NO
YES
NO
NO
NO
YES
NO
YES
YES
NO
NO
YES
NO
NO
YES
NO
NO
NO
YES
YES
NO
YES
NO
NO
NO
YES
YES
YES
NO
YES
NO
NO
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
...

result:

ok 100000 lines

Test #56:

score: 0
Accepted
time: 71ms
memory: 37844kb

input:

100000 100000
83337366 41865897 91805345 85295452 94377603 94697897 58210797 31193833 24348787 45618620 78755841 39843422 83258118 93953296 58108435 88414191 84184329 39374538 57325861 82231196 23627300 60816075 61767051 51558918 66883500 100659658 31365537 33919634 88992041 98645438 50660774 656634...

output:

YES
NO
NO
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
YES
YES
NO
NO
NO
NO
NO
YES
YES
YES
YES
NO
NO
YES
NO
YES
NO
NO
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
YES
NO
YES
NO
YES
YES
NO
NO
YES
N...

result:

ok 100000 lines

Test #57:

score: 0
Accepted
time: 22ms
memory: 35768kb

input:

81473 13549
972586683 972586964 972587245 972587526 972587807 972588088 972588369 972588650 972588931 972589212 972589493 972589774 972590055 972590336 972590617 972590898 972591179 972591460 972591741 972592022 972592303 972592584 972592865 972593146 972593427 972593708 972593989 972594270 97259455...

output:

NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
...

result:

ok 6775 lines

Test #58:

score: 0
Accepted
time: 62ms
memory: 37804kb

input:

100000 100000
714600560 730643148 746685736 762728324 778770912 794813500 810856088 826898676 842941264 858983852 875026440 891069028 735192607 744336731 753480855 762624979 771769103 780913227 790057351 799201475 808345599 817489723 826633847 835777971 844922095 854066219 863210343 872354467 189583...

output:

NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
NO
NO
NO
YES
YES
YES
NO
NO
YES
YES
NO
NO
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
YES
YES
YES
NO
YES
NO
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
NO
NO
NO
YES
YES
YES
NO
NO
NO
NO
NO
YE...

result:

ok 100000 lines

Test #59:

score: 0
Accepted
time: 75ms
memory: 37956kb

input:

100000 100000
826896038 755844816 791370427 720319205 968998482 933472871 862421649 897947260 660302887 758290117 611309272 807283732 709296502 905270962 856277347 587842393 432345364 276848335 691507079 484177707 380513021 639674736 536010050 328680678 843812198 845914600 841709796 846965801 842760...

output:

YES
YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
YES
NO
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
NO
NO
YES
NO
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
NO
NO
YES
YES
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
NO
NO
NO
YES
NO
NO
YES
YE...

result:

ok 100000 lines

Test #60:

score: 0
Accepted
time: 83ms
memory: 37836kb

input:

100000 100000
583922808 376569753 411660270 555212385 708334641 347859330 478651257 711524688 366999612 382949847 485031351 516931821 749805252 507361680 344669283 433990599 768945534 402090129 670054077 351049377 529692009 638153607 462701022 408470223 676434171 743425158 446750787 459510975 577542...

output:

YES
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
NO
NO
NO
YES
YES
NO
YES
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
NO
YES
NO
YES
NO
NO
NO
YES
NO
YES
NO
NO
YES
YES
YES
YES
NO
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
NO
NO
NO
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
...

result:

ok 100000 lines

Test #61:

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

input:

100000 100000
841193133 841193770 841194407 841195044 841195681 841196318 841196955 841197592 841198229 841198866 841199503 841200140 841200777 841201414 841202051 841202688 841203325 841203962 841204599 841205236 841205873 841206510 841207147 841207784 841208421 841209058 841209695 841210332 841210...

output:

YES
NO
NO
YES
YES
NO
NO
NO
YES
YES
NO
NO
YES
YES
YES
YES
YES
NO
YES
NO
NO
NO
NO
YES
YES
NO
YES
YES
YES
NO
NO
YES
YES
YES
NO
YES
YES
NO
YES
NO
NO
NO
NO
NO
YES
YES
NO
NO
YES
YES
YES
NO
YES
YES
YES
NO
NO
NO
NO
YES
YES
YES
YES
YES
NO
NO
NO
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES...

result:

ok 100000 lines

Test #62:

score: 0
Accepted
time: 61ms
memory: 37896kb

input:

100000 100000
915384208 845299732 890537176 894062124 874775780 877029766 862988662 884369434 903459540 903118416 930303798 866421910 928581672 915771182 914228788 849312524 860133124 854447724 931556420 876094426 907740096 900919450 858799806 855650828 869528706 924490018 882830708 877638654 920886...

output:

NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
NO
YES
NO
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
YES
YES
YES
NO
YES
YES
NO
NO
NO
NO
NO
YES
NO
YES
NO
YES
NO
YES
YES
NO
NO
NO
YES
YES
NO
NO
NO
YES
NO
NO
YES
YES
NO
YES
YES
NO
NO
YES
NO
NO
NO
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
NO
NO
YES
NO
YE...

result:

ok 100000 lines

Test #63:

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

input:

100000 100000
805596536 805598488 805600440 805602392 805604344 805606296 805608248 805610200 805612152 805614104 805616056 805618008 805619960 805621912 805623864 805625816 805627768 805629720 805631672 805633624 805635576 805637528 805639480 805641432 805643384 805645336 805647288 805649240 805651...

output:

NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
NO
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
Y...

result:

ok 100000 lines

Test #64:

score: 0
Accepted
time: 78ms
memory: 35804kb

input:

100000 100000
295533716 187524776 204732980 493456226 185271656 185342066 396135524 574427726 560979416 424426262 501398474 538208822 240965966 191003030 421581698 294646550 301687550 286873286 365774732 304165982 455660138 365422682 422947652 547305794 322345844 597170156 510579938 228601970 372069...

output:

YES
YES
NO
YES
NO
NO
NO
YES
NO
YES
NO
YES
YES
NO
YES
NO
NO
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
NO
NO
NO
YES
YES
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
YES
YES
YES
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
YES
N...

result:

ok 100000 lines

Test #65:

score: 0
Accepted
time: 67ms
memory: 36844kb

input:

100000 100000
979670262 979671103 979671944 979672785 979673626 979674467 979675308 979676149 979676990 979677831 979678672 979679513 979680354 979681195 979682036 979682877 979683718 979684559 979685400 979686241 979687082 979687923 979688764 979689605 979690446 979691287 979692128 979692969 979693...

output:

NO
YES
YES
YES
NO
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
YES
NO
NO
YES
YES
YES
NO
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
NO
NO
YES
NO
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
NO
YES
YES
YES
YES
YES
NO
NO
YES
YES
NO
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
NO
NO
YES
NO
YES
YES
NO
YES
YES
NO...

result:

ok 100000 lines

Test #66:

score: 0
Accepted
time: 72ms
memory: 37808kb

input:

100000 100000
163151548 177402157 278811622 107611585 206492899 272814349 205030426 94449328 85799197 94664731 181483477 160453342 235810381 258439033 157210960 115400104 220256017 210721600 93769108 137393884 293697103 157074916 269674000 72829669 275172445 165044827 128811775 147891946 268494952 2...

output:

NO
YES
YES
NO
YES
NO
NO
NO
NO
NO
YES
YES
YES
YES
NO
NO
NO
YES
NO
NO
YES
NO
YES
YES
NO
YES
YES
YES
YES
NO
NO
YES
YES
NO
NO
NO
NO
YES
NO
YES
YES
YES
NO
NO
YES
NO
YES
YES
YES
YES
NO
NO
YES
NO
YES
YES
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
NO
YES
NO
YES
YES
YES
NO
YES
Y...

result:

ok 100000 lines

Test #67:

score: 0
Accepted
time: 63ms
memory: 35772kb

input:

100000 100000
870778007 877789528 884801049 891812570 898824091 905835612 912847133 919858654 926870175 933881696 940893217 673658592 676471288 679283984 682096680 684909376 687722072 690534768 693347464 696160160 698972856 701785552 53744405 84219695 114694985 145170275 175645565 206120855 23659614...

output:

NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
NO
NO
NO
YES
NO
YES
NO
NO
YES
NO
YES
NO
NO
NO
YES
NO
NO
NO
YES
YES
YES
YES
NO
YES
NO
YES
NO
NO
NO
YES
NO
NO
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
NO
NO
YES
NO
YES
YES
YES
YES
NO
NO
NO
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
NO
YES
YES
...

result:

ok 100000 lines

Test #68:

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

input:

81473 13549
983386637 984734032 979964338 986876095 990295865 989243239 976482467 985452268 975176941 982533240 975226678 983625206 975882532 975473396 980342002 978116201 990990778 989908647 976454929 993674328 978731872 980959078 973980443 993192694 986667874 986122172 989109202 972815417 98173969...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 6775 lines

Test #69:

score: 0
Accepted
time: 61ms
memory: 37940kb

input:

100000 100000
342538361 557052349 309536209 474546969 260032981 276534057 359039437 573553425 293035133 491048045 326037285 425043741 408542665 507549121 540551273 590054501 524050197 392041589 441544817 375540513 458045893 444943781 856443061 638590501 783825541 614384661 832237221 420737941 565972...

output:

NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
YES
NO
YES
YES
YES
YES
YES
NO
NO
YES
NO
NO
YES
YES
YES
YES
NO
YES
NO
YES
NO
NO
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
NO
NO
NO
NO
YES
YES
YES
YES
YE...

result:

ok 100000 lines

Test #70:

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

input:

100000 100000
203631541 203637780 203644019 203650258 203656497 203662736 203668975 203675214 203681453 203687692 203693931 203700170 203706409 203712648 203718887 203725126 203731365 203737604 203743843 203750082 203756321 203762560 203768799 203775038 203781277 203787516 203793755 203799994 203806...

output:

YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
Y...

result:

ok 100000 lines

Test #71:

score: 0
Accepted
time: 131ms
memory: 39448kb

input:

100000 100000
651994601 200334523 931253144 23373930 449330387 623216792 112007817 221069928 866439403 37498951 139787742 615199197 395113441 165182062 810304015 505708219 258301033 679578401 920541632 386242063 9424077 480153070 694167485 271708504 883417325 494522283 191305856 182054767 54943322 5...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 50079 lines

Test #72:

score: 0
Accepted
time: 65ms
memory: 37852kb

input:

100000 100000
471717230 899592618 175728559 905519743 878834749 845041708 190499198 580486536 830000684 642822221 878145451 778064236 763488886 45781020 57233670 97967737 265379640 928074139 346193286 181316889 445513367 50073898 102331580 239625557 170507475 496593243 816030204 556386891 628546003 ...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 100000 lines

Test #73:

score: 0
Accepted
time: 30ms
memory: 36512kb

input:

81473 13549
972586683 972586964 972587245 972587526 972587807 972588088 972588369 972588650 972588931 972589212 972589493 972589774 972590055 972590336 972590617 972590898 972591179 972591460 972591741 972592022 972592303 972592584 972592865 972593146 972593427 972593708 972593989 972594270 97259455...

output:

YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
NO...

result:

ok 4517 lines

Test #74:

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

input:

81473 13549
978852702 976739582 980349027 992499467 982792322 984792761 980580009 990828079 989891787 985146540 973252934 993233439 975822960 991342309 976306280 992486822 976923075 985114225 974105207 993634707 981745597 984343161 974360917 992330586 995412032 978520560 977461471 991406939 97835589...

output:

NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES...

result:

ok 4517 lines