QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#47970#4758. Captivating processQingyuAC ✓312ms84276kbC++5.4kb2022-09-10 21:19:552022-09-10 21:19:58

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-10 21:19:58]
  • 评测
  • 测评结果:AC
  • 用时:312ms
  • 内存:84276kb
  • [2022-09-10 21:19:55]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
const int N = 2e5 + 50;

int n, q, f[N], g[N], qx[N], qy[N];
bool ok[N];

struct tree_t {
	int fa[N], d[N], len[N], pos[N], col[N], ctot, vtot, vis[N];
	int dfn[N], siz[N], tot;
	vector<int> circ[N], G[N], H[N];
	bool in_cycle[N];
	void build(int *f) {
		for (int i = 1; i <= n; ++i) {
			fa[i] = f[i];
			G[fa[i]].push_back(i);
		}
	}
	void dfs(int x) {
		vis[x] = vtot;
		if (vis[fa[x]] == vtot) {
			int y = x, c = 0;
			++ctot;
			do {
				circ[ctot].push_back(y);
				col[y] = ctot;
				pos[y] = c;
				y = fa[y];
				in_cycle[y] = true;
				++c;
			} while (y != x);
			for (int x : circ[ctot])
				len[x] = circ[ctot].size();
		}
		else {
			if (!vis[fa[x]]) dfs(fa[x]);
			col[x] = col[fa[x]];
			len[x] = len[fa[x]];
			pos[x] = (pos[fa[x]] + len[x] - 1) % len[x];
		}
	}
	void dfs2(int x) {
		siz[x] = 1;
		dfn[x] = ++tot;
		for (int y : G[x]) if (!in_cycle[y]) {
			d[y] = d[x] + 1;
			dfs2(y);
			siz[x] += siz[y];
		}
	}
	void go() {
		for (int i = 1; i <= n; ++i) if (!vis[i]) {
			++vtot;
			dfs(i);
		}
		for (int i = 1; i <= ctot; ++i) {
			for (int x : circ[i]) {
				d[x] = 0;
				dfs2(x);
			}
		}
	}
} F, G;

void solve_stage1() {
	set<pair<tuple<int, int, int>, int>> s1;
	for (int i = 1; i <= q; ++i) if (!ok[i]) {
		int x = qx[i], y = qy[i];
		int g = gcd(F.len[x], G.len[y]);
		s1.emplace(make_tuple(F.col[x], G.col[y], ((F.pos[x] - G.pos[y]) % g + g) % g), i);
	}
	for (int v = 1; v <= n; ++v) if (F.in_cycle[v] && G.in_cycle[v]) {
		int g = gcd(F.len[v], G.len[v]);
		auto t = make_tuple(F.col[v], G.col[v], ((F.pos[v] - G.pos[v]) % g + g) % g);
		auto p = make_pair(t, -1);
		for (auto it = s1.lower_bound(p); ; it = s1.lower_bound(p)) {
			if (it == s1.end()) break;
			if (it->first != t) break;
			ok[it->second] = true;
			s1.erase(it);
		}
	}

}

vector<int> qu[N * 2], rect[N * 2];

inline int lowbit(int x) { return x & -x; }

struct fenwick_t {
	int t[N];
	vector<int> bin;
	inline void add(int p, int v) {
		++p;
		bin.push_back(p);
		for (; p < N; p += lowbit(p)) {
			t[p] += v;
		}
	}
	inline int query(int p) {
		++p;
		int val = 0;
		for (; p; p -= lowbit(p)) val += t[p];
		return val;
	}
	void clear() {
		for (int x : bin) {
			for (; x < N; x += lowbit(x)) t[x] = 0;
		}
		bin.clear();
	}
} T;

struct op_t {
	int x, y1, y2, v;
	op_t(int x, int y1, int y2, int v) : x(x), y1(y1), y2(y2), v(v) {
	}
	bool operator<(const op_t &rhs) const {
		return x < rhs.x;
	}
};

struct query_t {
	int x, y, i;
	query_t(int x, int y, int i) : x(x), y(y), i(i) {}
	bool operator<(const query_t &rhs) const {
		return x < rhs.x;
	}
};

void work(const vector<int> &queries, const vector<int> &rectangles, auto gen_query, auto gen_rect) {
	vector<op_t> op;
	vector<query_t> qu;
	for (int i : queries) {
		gen_query(i, qu);
	}
	for (int i : rectangles) {
		gen_rect(i, op);
	}
	sort(qu.begin(), qu.end()); sort(op.begin(), op.end());
	int p = 0;
	auto go = [&](const query_t &o) {
		assert(T.query(o.y) >= 0);
		if (T.query(o.y) > 0) {
			ok[o.i] = true;
		}
	};
	for (auto [x, y1, y2, v] : op) {
		while (p < (int)qu.size() && qu[p].x < x) go(qu[p++]);
		T.add(y1, v);
		T.add(y2 + 1, -v);
	}
	while (p < (int)qu.size()) go(qu[p++]);
	T.clear();
}

void solve_stage2() {
	for (int i = 0; i < 2 * N; ++i) qu[i].clear(), rect[i].clear();
	for (int i = 1; i <= q; ++i) if (!ok[i]) {
		int x = qx[i], y = qy[i];
		qu[F.d[x] - G.d[y] + N].push_back(i);
	}
	for (int v = 1; v <= n; ++v) if (!F.in_cycle[v] && !G.in_cycle[v]) {
		rect[F.d[v] - G.d[v] + N].push_back(v);
	}
	for (int i = 0; i < 2 * N; ++i)
		if (!qu[i].empty() && !rect[i].empty()) {
			work(qu[i], rect[i], [&](int i, auto &qu) {
				qu.emplace_back(F.dfn[qx[i]], G.dfn[qy[i]], i);	
			}, [&](int i, auto &op) {
				int x1 = F.dfn[i], x2 = F.dfn[i] + F.siz[i] - 1;
				int y1 = G.dfn[i], y2 = G.dfn[i] + G.siz[i] - 1;
				op.emplace_back(x1, y1, y2, 1);
				op.emplace_back(x2 + 1, y1, y2, -1);
				
			});
		}
}

void solve_stage3(tree_t &F, tree_t &G) {
	map<pair<int, int>, vector<int>> qu_map, rect_map;
	for (int i = 1; i <= q; ++i) if (!ok[i]) {
		int x = qx[i], y = qy[i];
		int L = F.len[x];
		auto p = make_pair(F.col[x], (F.pos[x] + G.d[y] + L) % L);
		qu_map[p].push_back(i);
	}
	for (int v = 1; v <= n; ++v) if (F.in_cycle[v] && !G.in_cycle[v]) {
		int L = F.len[v];
		auto p = make_pair(F.col[v], (F.pos[v] + G.d[v] + L) % L);
		rect_map[p].push_back(v);
	}
	for (auto p : qu_map) if (!qu_map[p.first].empty() && !rect_map[p.first].empty()) {
		work(qu_map[p.first], rect_map[p.first], [&](int i, auto &qu) {
			int x = qx[i], y = qy[i];
			qu.emplace_back(G.d[y] - F.d[x], G.dfn[y], i);
		}, [&](int i, auto &op) {
			int x = G.d[i];
			int y1 = G.dfn[i], y2 = G.dfn[i] + G.siz[i] - 1;
			op.emplace_back(x, y1, y2, 1);
		});	
	}
}

void gogo() {
	F.build(f), G.build(g);
	F.go(), G.go();
	solve_stage1();
	solve_stage2();
	solve_stage3(F, G);
	swap(qx, qy);
	solve_stage3(G, F);
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	cin >> n >> q;
	for (int i = 1; i <= n; ++i) cin >> f[i];
	for (int i = 1; i <= n; ++i) cin >> g[i];
	for (int i = 1; i <= q; ++i) {
		cin >> qx[i] >> qy[i];
	}
	gogo();
	for (int i = 1; i <= q; ++i) {
		cout << (ok[i] ? "YES" : "NO") << '\n';
	}
	return 0;
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

score: 100
Accepted
time: 16ms
memory: 53064kb

input:

3 2
2 3 1
2 3 1
1 2
1 1

output:

NO
YES

result:

ok 2 token(s): yes count is 1, no count is 1

Test #2:

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

input:

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

output:

NO
YES

result:

ok 2 token(s): yes count is 1, no count is 1

Test #3:

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

input:

10 10
7 7 8 10 5 7 9 3 2 3
4 2 7 1 3 3 10 1 9 3
7 8
7 6
7 9
1 5
3 6
5 3
10 6
8 9
9 4
6 7

output:

NO
NO
YES
NO
YES
NO
YES
NO
NO
NO

result:

ok 10 token(s): yes count is 3, no count is 7

Test #4:

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

input:

10 10
5 7 8 2 6 8 7 5 5 10
8 2 5 8 3 9 10 7 2 8
8 7
5 6
4 9
3 6
5 6
2 3
8 4
5 9
6 8
3 4

output:

NO
NO
YES
NO
NO
NO
NO
NO
NO
YES

result:

ok 10 token(s): yes count is 2, no count is 8

Test #5:

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

input:

10 10
1 9 4 4 2 6 7 8 9 4
1 9 9 5 5 1 3 9 3 10
1 7
3 8
7 8
9 8
6 9
10 7
3 5
1 7
8 5
8 5

output:

NO
NO
NO
YES
NO
NO
NO
NO
NO
NO

result:

ok 10 token(s): yes count is 1, no count is 9

Test #6:

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

input:

10 10
8 2 4 4 7 10 9 9 10 5
5 4 9 3 10 6 10 10 5 4
7 8
2 3
6 2
1 2
2 10
5 4
10 4
10 9
10 7
6 1

output:

YES
NO
YES
YES
NO
YES
YES
YES
YES
YES

result:

ok 10 token(s): yes count is 8, no count is 2

Test #7:

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

input:

10 10
4 4 8 3 7 7 7 2 10 9
4 10 6 6 4 10 5 8 5 9
3 7
6 2
1 2
3 2
4 7
1 9
6 5
5 10
6 1
5 2

output:

YES
NO
YES
YES
YES
YES
NO
NO
NO
NO

result:

ok 10 token(s): yes count is 5, no count is 5

Test #8:

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

input:

10 10
3 10 1 8 8 3 8 4 9 10
8 6 4 2 10 3 6 3 4 10
2 7
8 3
2 8
3 3
1 9
4 3
6 8
5 10
8 8
6 8

output:

NO
YES
NO
YES
NO
NO
YES
NO
YES
YES

result:

ok 10 token(s): yes count is 5, no count is 5

Test #9:

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

input:

10 10
1 8 3 5 4 2 6 7 8 7
6 4 6 3 8 7 4 3 9 4
8 2
4 2
4 2
4 3
3 10
4 10
7 1
7 8
4 2
6 3

output:

NO
NO
NO
NO
YES
NO
YES
NO
NO
NO

result:

ok 10 token(s): yes count is 2, no count is 8

Test #10:

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

input:

10 10
5 4 7 3 3 6 4 8 2 9
1 5 2 2 6 3 2 4 1 5
4 4
10 2
2 7
6 4
9 6
9 10
10 9
7 4
7 7
5 4

output:

YES
YES
YES
YES
YES
YES
NO
YES
YES
YES

result:

ok 10 token(s): yes count is 9, no count is 1

Test #11:

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

input:

100 100
41 55 57 45 38 30 83 53 33 51 90 57 82 35 28 54 35 47 39 68 67 98 57 8 71 99 83 39 83 44 76 88 18 41 15 17 39 46 79 79 54 28 57 22 81 33 63 17 1 21 32 58 47 17 4 46 10 45 97 44 29 71 5 50 79 66 83 88 43 97 50 56 5 100 23 1 66 16 76 34 71 60 59 57 87 47 6 23 68 55 79 32 73 10 98 65 90 30 79 5...

output:

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

result:

ok 100 token(s): yes count is 35, no count is 65

Test #12:

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

input:

100 100
70 57 94 89 18 74 52 32 87 20 73 47 60 55 74 37 33 81 55 2 23 23 69 23 52 12 92 85 38 25 41 66 49 94 27 50 23 35 23 38 58 81 75 92 11 6 36 33 8 60 13 2 58 93 59 67 46 95 45 12 56 87 31 25 18 5 17 10 95 47 38 72 87 84 17 39 74 36 39 23 91 90 86 68 23 20 38 29 60 60 56 19 66 43 21 7 84 25 41 5...

output:

YES
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
YES
YES
YES
NO
NO
NO
NO
YES
YES
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
NO
NO...

result:

ok 100 token(s): yes count is 28, no count is 72

Test #13:

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

input:

100 100
48 86 67 28 67 38 10 31 5 90 67 38 64 38 86 22 29 71 25 27 89 34 4 83 99 82 45 79 50 12 13 38 4 49 77 90 4 81 87 92 4 50 65 37 86 90 45 69 17 34 32 38 13 77 10 68 2 69 39 80 82 32 95 25 1 87 100 74 63 57 61 99 14 87 10 11 28 46 23 71 14 80 10 88 79 70 92 13 79 24 83 5 48 68 65 20 61 27 13 39...

output:

NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
YES
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
YES
NO
YES
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
...

result:

ok 100 token(s): yes count is 16, no count is 84

Test #14:

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

input:

100 100
29 3 9 64 93 98 50 93 98 79 28 28 16 18 30 68 91 80 5 39 93 14 79 96 91 98 25 20 33 49 14 28 65 64 50 15 68 20 62 92 23 50 29 9 47 85 23 36 11 24 35 52 70 70 99 15 1 96 14 32 77 89 100 35 46 82 94 74 32 64 57 46 31 19 13 75 48 62 53 97 26 90 35 92 61 1 59 61 57 73 25 9 55 14 92 47 81 66 76 8...

output:

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

result:

ok 100 token(s): yes count is 74, no count is 26

Test #15:

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

input:

100 100
86 1 12 24 31 19 62 98 11 27 18 13 68 79 20 91 89 5 66 9 42 94 93 52 64 13 63 32 82 3 98 75 39 85 52 21 13 69 46 15 13 67 20 89 56 74 89 30 88 49 22 47 7 58 99 90 92 42 34 3 59 65 71 23 73 86 32 42 59 21 39 83 100 65 27 8 3 30 6 12 11 10 89 9 50 14 42 55 64 61 9 75 51 15 90 76 80 4 90 26
100...

output:

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
NO
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
NO
NO
YES
...

result:

ok 100 token(s): yes count is 77, no count is 23

Test #16:

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

input:

100 100
35 70 20 10 57 8 23 53 22 79 50 71 33 3 37 55 31 77 68 57 65 59 21 27 75 52 13 81 12 22 57 78 62 19 26 45 48 78 7 87 96 53 15 93 2 88 40 29 84 18 57 75 50 15 46 62 54 48 16 81 29 40 27 14 19 48 53 100 97 45 99 27 39 81 73 75 93 84 69 98 64 93 63 10 73 51 8 35 13 78 18 15 83 60 14 93 60 42 78...

output:

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

result:

ok 100 token(s): yes count is 67, no count is 33

Test #17:

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

input:

100 100
61 33 6 75 57 51 9 23 64 97 54 28 72 49 55 45 13 89 91 80 43 30 99 89 27 36 59 100 95 61 37 4 91 67 71 61 8 19 81 66 77 5 53 65 68 34 26 98 95 79 96 45 59 66 81 25 86 5 90 6 21 48 82 58 14 78 93 50 88 45 28 20 83 97 62 71 84 20 67 85 13 50 46 93 86 2 88 31 68 71 39 20 69 34 65 32 22 60 83 47...

output:

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

result:

ok 100 token(s): yes count is 37, no count is 63

Test #18:

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

input:

100 100
45 27 7 34 10 5 90 61 3 73 74 29 94 45 28 60 57 44 75 59 15 79 76 99 32 54 90 84 37 45 44 39 26 93 18 29 16 25 100 38 82 54 61 53 98 62 92 33 86 8 85 32 59 92 57 28 83 88 55 80 36 5 59 19 3 24 4 14 78 44 39 42 15 68 64 49 72 40 41 43 74 81 44 6 47 23 60 24 32 51 35 51 27 17 94 57 43 22 42 19...

output:

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

result:

ok 100 token(s): yes count is 32, no count is 68

Test #19:

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

input:

100 100
90 94 79 48 1 93 16 78 42 64 93 81 15 84 93 5 70 97 70 82 93 4 20 5 80 55 92 55 57 78 70 7 26 22 38 89 23 77 87 59 60 23 49 77 6 9 99 41 80 10 91 14 51 64 7 57 24 33 57 81 35 83 18 37 84 17 100 58 74 98 13 9 67 62 9 70 61 29 85 3 34 52 26 70 43 76 73 95 59 69 84 91 39 47 78 84 41 50 28 45
73...

output:

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

result:

ok 100 token(s): yes count is 37, no count is 63

Test #20:

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

input:

100 100
59 76 55 74 15 80 48 58 53 9 99 34 55 62 69 25 71 95 75 40 54 8 51 54 91 65 18 48 22 15 77 45 21 46 14 12 2 58 13 10 73 81 27 23 31 87 74 24 73 14 41 25 67 96 33 18 90 56 94 79 46 83 27 20 94 61 91 44 37 31 45 19 5 29 12 68 57 46 72 82 55 97 54 17 28 10 35 19 30 17 47 94 15 24 11 6 79 86 20 ...

output:

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

result:

ok 100 token(s): yes count is 69, no count is 31

Test #21:

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

input:

100 100
70 35 83 50 63 74 45 19 17 15 96 98 31 29 97 38 54 1 2 29 24 58 73 60 69 94 31 92 66 4 34 6 49 37 79 11 75 84 9 100 2 38 64 9 16 33 29 95 61 92 3 30 95 23 12 80 58 100 6 10 26 86 18 44 83 21 5 82 46 14 99 86 4 53 63 64 51 66 12 25 22 36 38 88 23 55 13 56 35 59 78 89 36 77 13 43 90 68 92 32
7...

output:

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

result:

ok 100 token(s): yes count is 63, no count is 37

Test #22:

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

input:

100 100
95 52 23 14 81 29 36 57 88 22 85 37 42 25 39 17 46 48 82 47 86 35 65 77 90 73 55 70 11 54 19 13 73 12 84 69 76 26 97 23 16 44 34 78 50 18 71 49 86 63 7 15 56 13 26 74 64 45 67 52 15 37 53 24 54 59 17 79 1 61 54 20 96 43 19 90 9 68 51 79 24 66 3 50 28 19 31 98 60 22 69 96 83 9 40 6 77 27 100 ...

output:

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

result:

ok 100 token(s): yes count is 71, no count is 29

Test #23:

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

input:

1000 1000
670 933 61 49 782 717 517 379 845 683 94 724 202 183 1000 595 95 713 375 852 160 833 669 743 29 854 169 608 980 787 760 622 999 214 380 13 835 183 553 372 529 775 521 401 881 845 584 257 714 612 929 654 548 911 295 458 318 550 55 834 222 306 975 672 827 224 153 237 821 851 89 476 246 830 6...

output:

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

result:

ok 1000 token(s): yes count is 578, no count is 422

Test #24:

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

input:

1000 1000
150 928 684 820 869 148 247 594 365 829 51 515 115 167 986 737 552 787 907 120 871 979 674 337 380 497 230 960 958 799 273 249 60 252 332 378 258 75 758 923 601 404 781 596 829 413 295 56 121 459 146 526 193 614 233 789 433 165 637 766 699 228 424 717 133 191 984 651 300 110 381 864 489 26...

output:

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

result:

ok 1000 token(s): yes count is 548, no count is 452

Test #25:

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

input:

1000 1000
978 931 774 425 608 663 641 298 902 827 376 785 723 259 169 224 872 236 631 716 172 997 730 954 809 479 267 659 61 371 99 821 442 806 651 577 93 671 719 503 516 280 326 506 246 925 352 789 575 547 968 660 523 668 978 880 952 668 471 833 786 200 833 449 159 630 765 290 257 261 712 416 151 2...

output:

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

result:

ok 1000 token(s): yes count is 534, no count is 466

Test #26:

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

input:

1000 1000
925 396 209 391 896 547 349 722 65 16 454 490 420 659 266 777 37 523 768 323 515 814 881 565 412 257 938 727 49 902 190 366 70 658 740 829 77 745 771 619 43 51 601 10 337 756 902 313 996 826 940 992 638 796 117 272 847 763 787 354 204 629 946 986 282 944 946 732 708 981 529 90 219 14 823 8...

output:

YES
NO
NO
YES
YES
YES
YES
YES
NO
YES
NO
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
NO
YES
NO
YES
YES
YES
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
YES
NO
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YE...

result:

ok 1000 token(s): yes count is 774, no count is 226

Test #27:

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

input:

1000 1000
305 848 938 412 350 817 26 564 132 234 683 744 120 533 630 145 73 960 666 123 713 346 681 303 239 285 533 976 727 857 188 215 327 934 62 948 527 201 818 771 659 890 59 955 191 542 273 611 282 299 280 64 873 393 99 359 646 108 581 435 628 715 161 644 51 631 884 197 653 320 94 488 134 48 615...

output:

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
NO
YES
NO
NO
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
NO
YES
NO
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
Y...

result:

ok 1000 token(s): yes count is 747, no count is 253

Test #28:

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

input:

1000 1000
327 371 676 172 845 3 701 763 29 165 257 236 912 700 218 301 599 891 8 549 372 68 401 142 332 726 748 55 334 264 401 507 829 425 855 963 104 19 792 998 694 944 240 8 737 835 37 863 741 651 803 763 680 776 559 511 968 459 639 621 71 740 71 588 267 456 374 701 888 697 864 932 275 348 945 801...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
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
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
Y...

result:

ok 1000 token(s): yes count is 927, no count is 73

Test #29:

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

input:

1000 1000
82 441 995 519 77 611 193 139 677 391 468 126 21 453 781 288 346 731 574 632 615 783 424 85 990 640 773 144 284 757 158 125 19 316 839 990 80 705 686 451 952 258 542 877 773 767 876 752 130 927 837 927 577 360 231 296 320 543 417 481 544 916 307 2 599 85 236 328 509 935 974 531 858 486 21 ...

output:

NO
NO
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
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
YES
YES
YES
Y...

result:

ok 1000 token(s): yes count is 754, no count is 246

Test #30:

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

input:

1000 1000
140 387 349 905 260 752 94 467 725 635 391 645 725 794 796 384 463 290 912 521 956 543 207 95 10 150 913 982 522 352 958 102 114 483 628 319 254 126 221 629 339 377 927 981 334 452 765 647 915 789 226 867 591 189 186 768 94 235 198 899 590 888 741 743 467 275 419 942 442 549 814 304 358 34...

output:

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

result:

ok 1000 token(s): yes count is 784, no count is 216

Test #31:

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

input:

1000 1000
473 786 818 334 938 322 702 82 710 67 460 855 831 350 496 201 255 602 263 841 677 271 981 308 402 826 751 678 588 693 660 722 497 74 11 962 808 232 283 492 750 756 287 835 252 733 551 69 877 884 109 471 644 257 461 577 446 729 308 971 415 26 249 116 904 819 921 247 847 131 647 449 616 993 ...

output:

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

result:

ok 1000 token(s): yes count is 472, no count is 528

Test #32:

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

input:

1000 1000
433 272 373 324 566 843 355 761 919 144 557 168 632 854 680 264 23 510 603 858 459 758 176 149 85 476 736 238 777 966 863 16 555 778 715 84 216 389 930 337 648 526 836 872 699 769 666 226 789 465 102 414 659 96 897 431 225 403 406 865 430 656 86 851 829 665 12 146 926 285 757 832 137 259 6...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
YES
NO
NO
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
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
Y...

result:

ok 1000 token(s): yes count is 849, no count is 151

Test #33:

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

input:

1000 1000
607 449 297 708 974 50 831 844 266 190 170 900 406 784 714 352 599 917 211 891 45 578 629 988 495 336 65 361 926 736 411 817 778 520 763 622 58 653 272 987 263 124 181 954 315 516 872 493 354 460 687 90 644 768 989 880 399 738 429 13 790 889 397 268 133 611 362 742 244 304 120 152 42 351 2...

output:

YES
YES
NO
YES
NO
NO
YES
NO
YES
YES
NO
YES
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
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
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES...

result:

ok 1000 token(s): yes count is 871, no count is 129

Test #34:

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

input:

1000 1000
768 287 319 347 303 477 184 284 957 591 376 330 191 105 157 300 434 433 435 622 465 430 406 466 383 306 391 271 188 109 756 722 769 505 402 642 340 297 702 686 338 931 371 444 331 519 439 388 476 320 336 174 369 452 916 533 505 852 908 625 813 549 101 888 653 260 926 848 749 968 995 559 48...

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
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YE...

result:

ok 1000 token(s): yes count is 912, no count is 88

Test #35:

score: 0
Accepted
time: 183ms
memory: 72800kb

input:

100000 100000
63821 89740 88188 36317 60750 81601 65195 26021 53849 78215 40363 12575 41967 16413 1166 99946 24647 17518 86893 41539 1302 15450 3422 8704 26690 61125 95668 50258 35729 14488 39156 13282 72003 64776 24740 65571 31773 82979 22266 27872 10936 20958 83101 69596 52753 34309 79373 8834 984...

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 token(s): yes count is 32, no count is 99968

Test #36:

score: 0
Accepted
time: 176ms
memory: 73440kb

input:

100000 100000
92124 82958 98646 42985 70352 62924 95092 3837 47381 19639 62354 21599 19350 61392 36827 98033 31216 96113 11246 95599 60025 43941 3660 42317 37817 61700 75428 2161 12342 86862 38104 12645 10176 26987 90658 44172 86605 5920 56559 67497 25905 80002 81158 85391 92460 79127 30566 7925 251...

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 token(s): yes count is 26, no count is 99974

Test #37:

score: 0
Accepted
time: 198ms
memory: 72096kb

input:

100000 100000
94599 37101 95352 78659 82358 69629 28033 57448 41904 44018 26291 69024 59402 67786 34033 19405 76870 65117 49480 78012 35039 88449 32968 59084 67865 10908 84881 19930 22951 19056 97181 8 95420 16057 75916 93041 3218 13415 30688 81083 40706 50676 48585 81028 62387 2082 14038 15576 6159...

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 token(s): yes count is 35, no count is 99965

Test #38:

score: 0
Accepted
time: 190ms
memory: 73140kb

input:

100000 100000
45878 83012 82406 89047 16145 68835 11691 67304 59228 85142 39238 48560 67435 77074 90143 1914 65417 54080 38165 59661 77362 46853 68012 38234 86681 34614 19972 89210 44149 5791 79219 76563 98326 15223 19656 90983 53487 72865 90081 89563 41253 66898 12306 3732 58822 45912 81066 36452 7...

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 token(s): yes count is 21, no count is 99979

Test #39:

score: 0
Accepted
time: 187ms
memory: 72996kb

input:

100000 100000
68096 91828 95075 29345 32180 31614 22205 13424 27029 48032 20077 35682 3150 61613 81944 94464 65453 39872 32189 25174 92766 29061 31768 61479 4021 16846 2395 84383 73457 26415 71292 52841 8078 74792 73998 82024 72186 62247 22053 72516 74541 59388 61228 90842 45487 73275 92939 1660 527...

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 token(s): yes count is 10, no count is 99990

Test #40:

score: 0
Accepted
time: 186ms
memory: 72740kb

input:

100000 100000
52562 80888 92716 91499 36186 66718 26961 26748 82889 20627 27134 18653 86452 32220 66180 58110 98905 84349 37669 55823 18020 6382 85660 61279 36204 80476 48777 36788 24369 14954 80594 70972 16348 93699 94573 17038 42706 85815 79890 75351 67415 63243 50638 22982 33063 85170 99260 93214...

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 token(s): yes count is 24, no count is 99976

Test #41:

score: 0
Accepted
time: 168ms
memory: 73468kb

input:

100000 100000
74184 90390 94681 80371 36446 26082 95107 82907 25244 48620 46824 64775 98420 89106 75134 82712 93648 16621 4311 6556 14064 92112 18306 42361 61516 28704 41853 55422 82143 79265 10031 53786 16412 153 46718 86592 94095 41991 41848 77136 45060 96916 59722 4801 41056 94707 35478 51786 382...

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
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
NO
NO
NO
NO
NO
NO
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
...

result:

ok 100000 token(s): yes count is 3435, no count is 96565

Test #42:

score: 0
Accepted
time: 119ms
memory: 71440kb

input:

100000 100000
3642 78300 63141 7687 21449 67277 12313 43479 37157 45998 85713 44296 92325 73990 53174 71184 86207 78046 17358 18583 22963 32823 2533 50681 71440 68533 62948 92374 16616 91313 23677 15992 57187 10592 27140 19048 86915 3450 44339 59923 6945 68322 5228 25385 67242 95090 73814 50551 9791...

output:

YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
YES
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
YES
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
N...

result:

ok 100000 token(s): yes count is 16342, no count is 83658

Test #43:

score: 0
Accepted
time: 158ms
memory: 73924kb

input:

100000 100000
29374 46610 4286 61885 53457 28706 89429 39067 26562 55421 17582 96076 63917 48525 7383 79698 58711 21329 53926 70295 5680 3872 6565 35876 31620 22056 28282 12827 56229 10786 50300 32169 52431 27184 21512 3725 32344 28654 80242 99589 58046 77386 38788 38651 81941 25692 29964 34625 5528...

output:

NO
NO
NO
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
YES
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
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
N...

result:

ok 100000 token(s): yes count is 4021, no count is 95979

Test #44:

score: 0
Accepted
time: 176ms
memory: 75132kb

input:

100000 100000
46736 41922 60374 49987 77172 79451 23276 43540 55479 86225 3372 7223 21383 45623 82839 39071 80767 68825 97403 59123 82184 48533 32932 10944 84359 65208 19196 69621 3890 24773 61255 95206 57427 32038 6452 60245 93484 53286 34739 83613 51979 1187 15428 25742 79949 36240 65989 80673 504...

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 token(s): yes count is 416, no count is 99584

Test #45:

score: 0
Accepted
time: 177ms
memory: 75624kb

input:

100000 100000
15172 92617 37860 45247 91399 83409 47796 90315 36303 80668 60109 73672 42331 95010 12318 81739 6839 64911 77261 5392 66277 26617 3862 9717 5251 65464 85964 10366 52485 10500 78597 8815 78795 6587 89532 53431 5626 81234 40078 6345 63578 62003 75384 1740 53705 84500 31714 71286 89974 96...

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
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 100000 token(s): yes count is 290, no count is 99710

Test #46:

score: 0
Accepted
time: 172ms
memory: 75520kb

input:

100000 100000
92372 44483 71464 8737 83615 70772 15567 66988 53042 93845 48217 36113 38977 13205 14049 91651 92897 86480 46516 54 18979 22565 36408 88190 11854 87892 2303 64591 12692 23526 42292 51424 89524 97337 72148 24091 93044 70999 50901 92681 54880 41997 56223 5940 98046 67540 49484 68762 9875...

output:

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
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
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 token(s): yes count is 310, no count is 99690

Test #47:

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

input:

100000 100000
37136 69688 70248 83808 72890 46605 50700 72213 95833 29294 18741 23142 87515 42470 2936 64480 42649 61344 2136 45110 95419 13444 88550 14534 3766 55818 98033 84128 5741 66597 93075 21425 79934 78383 95262 42797 86035 65210 31647 26879 9356 73 10135 39954 2424 75771 58060 73743 60869 7...

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 token(s): yes count is 273, no count is 99727

Test #48:

score: 0
Accepted
time: 169ms
memory: 72876kb

input:

100000 100000
1975 80532 28539 28757 21250 28399 83691 44859 38810 91772 93463 30168 20766 19862 87761 90917 88167 14186 97052 50820 20681 12294 94403 92706 94437 41287 80280 62054 36202 74046 39793 69527 35296 41849 75967 61611 79230 6772 17926 95667 38031 75123 76580 66858 97525 59567 60703 61783 ...

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 token(s): yes count is 217, no count is 99783

Test #49:

score: 0
Accepted
time: 183ms
memory: 73544kb

input:

100000 100000
87770 43605 9419 47562 2547 53133 39420 82490 29943 16908 34305 20790 59781 87483 65140 6424 11846 98479 86115 245 96600 67459 24551 88896 30232 72594 81910 695 84986 41224 116 18560 96459 88693 76918 21292 26630 69652 35468 60332 81331 6244 68152 73390 1036 899 30995 98656 2109 11509 ...

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 token(s): yes count is 234, no count is 99766

Test #50:

score: 0
Accepted
time: 239ms
memory: 77148kb

input:

100000 100000
84418 24325 99547 65508 37176 40600 72193 93967 51049 98289 89084 20017 3148 91862 39902 64693 11903 9647 98301 41521 92966 39704 40025 6098 28307 33174 56121 22313 35518 53232 45190 34009 1146 8692 780 37098 38220 82680 24452 26772 98686 37282 61500 49081 58235 8000 12464 41070 69658 ...

output:

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

result:

ok 100000 token(s): yes count is 27879, no count is 72121

Test #51:

score: 0
Accepted
time: 267ms
memory: 77524kb

input:

100000 100000
18948 43328 30363 43828 70575 53019 68102 67841 37117 29469 52462 19448 25991 48029 30635 43732 51000 78181 36374 48656 32243 37092 71612 49302 82938 19798 22063 42366 1107 93748 21549 70747 84278 31337 91351 24534 79359 99615 67228 41289 25040 62357 28484 98363 52880 26363 87658 21150...

output:

NO
NO
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
YES
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
NO
YES
NO
YES
NO
YES
NO
NO
YES
NO
NO
YES
NO
NO
NO
YES
NO
YES
YES
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
YES
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
...

result:

ok 100000 token(s): yes count is 27314, no count is 72686

Test #52:

score: 0
Accepted
time: 246ms
memory: 78232kb

input:

100000 100000
40782 90561 39420 92152 14102 12561 70030 89291 83071 77186 39620 56862 17316 84028 9442 29051 7046 59828 35543 29889 24551 27038 31593 74940 32757 47763 37727 87803 90800 40383 18854 87685 34672 72982 33839 1815 72296 41187 81517 98039 97743 31610 30243 20844 53768 32165 61356 788 996...

output:

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

result:

ok 100000 token(s): yes count is 26921, no count is 73079

Test #53:

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

input:

100000 100000
62803 40989 14386 19050 9014 67206 77452 12372 12235 62785 95712 61768 90885 84229 10645 2418 35998 77900 52443 70164 27584 53727 88923 16365 77884 99909 85170 62029 27444 85300 27982 25602 80944 45447 240 63228 88063 99768 32719 35409 55095 27744 17708 3624 98689 11693 32627 39292 594...

output:

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

result:

ok 100000 token(s): yes count is 27106, no count is 72894

Test #54:

score: 0
Accepted
time: 253ms
memory: 78088kb

input:

100000 100000
58045 68688 99464 48469 94171 50447 50666 11989 26873 25485 96080 44173 17642 27887 92732 86942 63869 25150 83474 58018 98851 15436 62508 15392 91490 48813 4271 21161 97512 95902 51238 38974 76426 55319 83042 88736 37709 76564 23494 65712 91573 1657 71237 27937 47416 83068 96487 29189 ...

output:

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

result:

ok 100000 token(s): yes count is 27954, no count is 72046

Test #55:

score: 0
Accepted
time: 218ms
memory: 75968kb

input:

100000 100000
6224 88371 82738 93323 76571 96780 26622 30109 30266 89491 58043 33559 45415 75265 16622 85453 18858 65152 32452 79588 29934 32971 28402 55899 96462 45686 93000 61148 34077 3562 23191 79989 84568 97556 87460 41676 14128 1129 20661 5464 89679 19640 9487 45666 97843 94882 79684 7198 1714...

output:

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

result:

ok 100000 token(s): yes count is 45613, no count is 54387

Test #56:

score: 0
Accepted
time: 242ms
memory: 75832kb

input:

100000 100000
10432 13413 22674 80378 48767 2741 40006 52985 83237 27361 81831 91690 94640 46915 13110 89981 12813 56772 7277 61023 26599 95894 63961 8503 43811 57507 18102 40051 7359 92122 6860 69745 28127 87356 75236 28881 81818 99678 47528 73480 87544 97734 59482 96329 66803 93472 77699 61635 410...

output:

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

result:

ok 100000 token(s): yes count is 44534, no count is 55466

Test #57:

score: 0
Accepted
time: 210ms
memory: 75180kb

input:

100000 100000
21680 19716 54594 69861 69938 16462 85512 18798 13372 85335 96861 41626 23016 33924 10939 84460 70850 21661 56617 85339 56811 25450 46566 26231 26626 69506 31150 27 27203 79262 89527 38858 73481 81011 21963 29470 85639 81129 82895 70066 88149 26248 47722 9022 13007 26825 17919 97487 73...

output:

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

result:

ok 100000 token(s): yes count is 44920, no count is 55080

Test #58:

score: 0
Accepted
time: 249ms
memory: 75404kb

input:

100000 100000
32693 1454 61753 7915 12672 88945 54927 16380 90243 87840 1325 19599 93365 36069 50397 32592 49219 31280 36203 54112 97885 43765 36188 61348 62625 69675 30308 9530 78651 35332 67759 6145 63742 11574 82024 11386 90174 45402 84722 71579 18165 83804 27125 15850 39556 59060 42656 33372 600...

output:

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

result:

ok 100000 token(s): yes count is 44094, no count is 55906

Test #59:

score: 0
Accepted
time: 237ms
memory: 75556kb

input:

100000 100000
54404 72381 3218 75556 52442 47059 51054 39064 78473 79616 52032 45398 11374 39249 71314 81496 6431 36639 44497 17461 11202 9847 59418 45732 84502 7408 12283 38825 13143 77733 56552 9641 23531 56297 92020 54212 62529 5539 69732 2825 35672 28621 56504 28391 69511 86253 68846 31463 63642...

output:

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

result:

ok 100000 token(s): yes count is 45823, no count is 54177

Test #60:

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

input:

100000 100000
99900 8057 85557 1349 41913 95552 64361 39922 76912 26035 53108 24596 76568 68666 12882 23218 3542 55881 33300 98917 477 77142 96653 50639 67850 56255 83990 75715 64284 99129 95462 38524 45156 41656 41573 15439 72742 25060 92458 31250 25283 29866 55230 82617 7268 24575 5716 67836 58613...

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 token(s): yes count is 389, no count is 99611

Test #61:

score: 0
Accepted
time: 271ms
memory: 79684kb

input:

100000 100000
99190 79083 90222 66869 90237 36221 32309 27875 39729 54296 84073 18348 19656 37252 4139 54672 26549 48232 24593 85374 7502 40091 3389 14082 15693 96780 47279 28471 86465 51090 30037 58784 20830 30230 12668 74654 29711 37716 33425 67850 25613 99116 16096 1772 55445 43476 86489 13670 27...

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
YES
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
N...

result:

ok 100000 token(s): yes count is 374, no count is 99626

Test #62:

score: 0
Accepted
time: 298ms
memory: 80064kb

input:

100000 100000
21625 60371 55820 13109 13643 23621 87571 75626 37374 18106 84574 55472 20609 73976 44147 56544 28075 77599 49491 66403 1551 6199 1677 87337 1252 60917 33150 34183 64886 90357 43278 27048 67986 86045 14160 43309 13912 2264 15928 47180 4258 75222 12215 66656 12732 79754 55795 61409 8563...

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 token(s): yes count is 390, no count is 99610

Test #63:

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

input:

100000 100000
77065 77193 77914 29391 78646 48144 45618 40160 25885 99955 82079 95254 27166 37496 68613 45952 59014 11007 61341 36184 53308 81796 29445 60482 34621 29837 42216 79228 87053 49241 81280 616 59575 59140 23819 72503 52596 46778 66898 99322 1490 80751 27047 1696 43246 89769 29902 6450 907...

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 token(s): yes count is 373, no count is 99627

Test #64:

score: 0
Accepted
time: 274ms
memory: 79272kb

input:

100000 100000
34122 79528 22774 64989 23628 148 65936 29513 4334 80075 834 52154 66875 14459 6241 84394 60229 2169 24292 32813 66371 26512 42097 63645 17165 39136 6795 94868 51647 84147 88926 68225 54473 24545 88600 92186 24589 78986 40813 12143 16284 75650 25413 27495 47743 59330 94250 56705 64264 ...

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
YES...

result:

ok 100000 token(s): yes count is 363, no count is 99637

Test #65:

score: 0
Accepted
time: 271ms
memory: 81924kb

input:

100000 100000
5885 56271 50816 30011 58689 94341 48183 28714 49596 6558 69861 28160 15862 37140 53762 38225 69244 27453 64433 34710 39210 68424 3423 47742 67533 90501 19661 16464 67543 91533 92595 2362 94965 48001 25022 99968 92855 34089 37651 89178 55959 59076 34381 78935 57486 16294 77387 80664 86...

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 token(s): yes count is 210, no count is 99790

Test #66:

score: 0
Accepted
time: 259ms
memory: 81648kb

input:

100000 100000
11839 64052 522 5235 88503 78739 33692 80229 40615 66255 5624 48587 85395 99713 8766 64034 51773 65512 36700 73747 38401 30075 97984 24092 66379 78622 51542 94427 9438 34376 64339 61797 5322 29098 57727 35862 18797 8277 63970 99519 44813 17443 3934 98735 12229 86869 48011 22451 3386 99...

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 token(s): yes count is 217, no count is 99783

Test #67:

score: 0
Accepted
time: 258ms
memory: 82080kb

input:

100000 100000
28260 60169 62499 355 3047 22180 9650 2150 72382 61628 9326 2733 17320 4728 76644 25933 30101 51911 70608 10117 95870 12991 12952 24135 39489 25111 98972 69684 6742 48558 30338 21528 23288 92477 5468 86367 82146 69528 3520 76093 13212 52898 2308 73970 56826 72481 48910 99248 11602 6773...

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 token(s): yes count is 233, no count is 99767

Test #68:

score: 0
Accepted
time: 253ms
memory: 81704kb

input:

100000 100000
82068 23297 23304 19070 62026 22325 92820 21987 77850 95911 34090 29717 25952 15186 21833 44978 79163 57219 31253 37131 45726 60498 98459 6280 105 70777 13758 85586 65065 53659 31987 16552 16758 78127 8758 31543 12263 81820 68342 27668 42509 88140 67497 91159 41895 80649 71745 95382 75...

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 token(s): yes count is 352, no count is 99648

Test #69:

score: 0
Accepted
time: 312ms
memory: 81712kb

input:

100000 100000
30668 25289 45166 13253 49668 52470 32926 2584 62997 61216 28159 49206 40238 3809 22580 26388 5175 53309 4980 91532 73767 62192 6128 59338 18874 35170 51150 90485 9315 44364 57102 6809 54285 69079 57226 32497 94760 43951 63328 28674 31011 5595 54374 9676 20910 41088 64134 85567 62828 6...

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
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...

result:

ok 100000 token(s): yes count is 202, no count is 99798

Test #70:

score: 0
Accepted
time: 244ms
memory: 81816kb

input:

100000 100000
76014 16863 54501 74253 36573 46750 6134 20579 686 43199 47844 12053 51450 91700 19981 68833 57454 10666 6664 13382 99701 4688 80187 74187 91369 99159 33011 33489 78868 69222 67428 29672 22095 80419 75860 22147 15659 12362 48713 62296 85734 29822 97883 35074 56701 72537 1562 9192 51665...

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
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
YES
NO
NO
NO
NO
NO
NO
NO
N...

result:

ok 100000 token(s): yes count is 345, no count is 99655

Test #71:

score: 0
Accepted
time: 265ms
memory: 84228kb

input:

100000 100000
30599 59338 23094 93625 90139 55315 57162 29215 98163 50782 79866 88074 12532 12772 89443 52370 39426 10180 70188 86977 46498 44204 69050 93683 42072 75993 98717 42813 87070 1150 5913 4218 806 55484 93916 11423 87679 14266 52339 34209 75403 84957 25134 99357 8066 3711 17706 47301 39596...

output:

NO
NO
NO
NO
YES
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
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
YES
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
...

result:

ok 100000 token(s): yes count is 14963, no count is 85037

Test #72:

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

input:

100000 100000
77294 19553 79625 23721 12832 77935 90826 80545 17201 15746 72899 21419 1776 54400 43887 2137 43849 15642 86 37053 78667 65789 63515 26853 20366 10309 46416 40814 43807 97827 53061 80779 50034 54366 59377 325 20348 5110 17614 67757 31853 51513 30275 91761 98305 1493 37030 48963 43459 8...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
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
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
YES
NO
...

result:

ok 100000 token(s): yes count is 15216, no count is 84784

Test #73:

score: 0
Accepted
time: 234ms
memory: 84276kb

input:

100000 100000
78573 54986 24968 80947 22156 30920 50360 78590 71699 36037 49480 90614 59949 70517 79032 89096 13828 7903 86705 85979 70516 45241 67992 9873 14642 59812 93188 56104 84852 71119 15822 13721 58081 50737 13831 63531 86101 6242 13071 33417 75060 58802 42688 14518 1984 76744 23207 55840 63...

output:

NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
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
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 100000 token(s): yes count is 15213, no count is 84787

Test #74:

score: 0
Accepted
time: 249ms
memory: 84248kb

input:

100000 100000
85673 25919 18208 25698 55548 72181 93942 34874 62064 61240 41090 20756 67696 33880 65445 7012 25589 92881 52271 20811 57659 99826 23969 50123 94702 43887 21638 46581 91230 14251 78786 42626 39246 71268 47715 13322 11576 42576 3929 27089 77292 57500 16477 54163 97481 83959 12142 91872 ...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
YES
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
YES
NO
YES
YES
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO...

result:

ok 100000 token(s): yes count is 15110, no count is 84890

Test #75:

score: 0
Accepted
time: 234ms
memory: 83712kb

input:

100000 100000
52855 79144 63549 38938 13248 59079 78527 58677 1246 50525 73651 14081 12123 66805 67184 10421 41255 59890 8889 63907 81008 50217 88846 51418 38964 41168 1208 77466 61235 38916 49511 68878 75318 95887 89193 57235 25160 74412 17478 91501 92274 68911 21771 93011 76087 77636 48550 60149 8...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
YES
YES
NO
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
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...

result:

ok 100000 token(s): yes count is 15050, no count is 84950

Test #76:

score: 0
Accepted
time: 240ms
memory: 83844kb

input:

100000 100000
86915 77453 81523 47073 43898 48759 7147 64995 57159 66753 83638 86535 55213 4407 43745 24769 23315 46060 78241 39239 61064 52744 32415 67585 62709 99124 94662 3604 93452 19925 629 41169 96792 36336 28801 24864 62751 95076 95609 10297 33566 27744 16475 73471 69537 50351 83078 16078 425...

output:

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
YES
YES
NO
NO
YES
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
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
YES
NO
NO
YES
NO
NO
NO
NO
...

result:

ok 100000 token(s): yes count is 15299, no count is 84701

Test #77:

score: 0
Accepted
time: 239ms
memory: 82608kb

input:

100000 100000
41395 8100 27881 13037 40960 34714 8660 5194 85007 74814 18215 74456 45401 23385 8649 31563 61416 16909 29579 70747 52561 31931 67729 63818 31451 34129 85451 70421 8906 3438 78666 98239 92054 94118 83879 49141 67699 37556 99056 68790 96077 93096 30884 98596 50159 71157 85870 67255 2408...

output:

NO
NO
NO
NO
NO
NO
YES
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
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
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
YES
NO
NO
NO
NO
NO...

result:

ok 100000 token(s): yes count is 4703, no count is 95297

Test #78:

score: 0
Accepted
time: 245ms
memory: 82520kb

input:

100000 100000
9839 46955 4478 64952 26432 8546 33166 45841 12126 27637 27685 20426 75296 55341 15149 83645 36698 9704 85029 72249 82507 55061 11273 22979 26966 11589 89416 78923 78585 54073 54264 3602 77686 88878 92487 46343 34930 48384 19481 37967 7763 15071 21311 22339 36719 88908 66901 5865 64046...

output:

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
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
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
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 token(s): yes count is 4898, no count is 95102

Test #79:

score: 0
Accepted
time: 230ms
memory: 82432kb

input:

100000 100000
80522 51476 65610 84738 44450 70986 46211 84636 72180 58158 67684 40801 24112 67436 87495 90856 82275 96395 87785 43827 43095 37304 56178 26050 81769 44165 99450 50661 15519 7708 4031 14100 2455 71052 41863 88938 64327 33849 27112 57304 51007 43772 25635 94800 21644 33040 42030 12961 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
YES
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
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
...

result:

ok 100000 token(s): yes count is 4931, no count is 95069

Test #80:

score: 0
Accepted
time: 134ms
memory: 69816kb

input:

100000 100000
1 2 3 4 5 6 7 2 1 6 8 11 2 9 1 15 16 7 3 8 11 14 6 15 14 11 5 6 20 13 12 32 14 3 14 21 4 33 32 1 32 10 42 23 40 28 41 20 21 32 27 36 16 1 19 12 36 29 18 54 47 40 46 58 63 10 24 42 41 49 36 49 17 69 67 3 47 78 44 24 75 63 32 25 9 4 51 9 71 63 38 54 59 54 16 60 90 82 22 81 16 51 41 61 34...

output:

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
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
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 100000 token(s): yes count is 6850, no count is 93150

Test #81:

score: 0
Accepted
time: 141ms
memory: 69820kb

input:

100000 100000
1 2 3 4 5 6 7 8 7 5 7 1 3 11 3 3 1 2 14 6 17 15 9 23 6 22 1 1 8 1 2 12 15 24 26 5 22 30 24 26 27 30 43 16 23 36 14 35 15 23 29 16 43 35 30 12 39 1 37 58 61 46 25 63 7 45 48 48 18 10 26 70 59 41 22 20 38 56 16 9 66 55 75 33 47 46 11 13 16 75 35 50 35 32 37 36 53 48 60 100 60 71 5 51 40 ...

output:

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
YES
NO
YES
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
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
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
...

result:

ok 100000 token(s): yes count is 11554, no count is 88446

Test #82:

score: 0
Accepted
time: 139ms
memory: 69952kb

input:

100000 100000
1 2 3 4 5 6 7 8 9 10 11 11 8 7 7 4 1 10 18 3 14 22 2 9 24 4 5 6 18 28 27 14 27 2 28 26 16 2 28 20 3 41 10 43 44 21 47 30 41 1 14 41 16 5 24 21 12 43 24 34 18 30 59 47 59 8 53 49 27 61 27 31 6 36 49 62 46 38 31 52 70 74 78 38 54 42 66 17 42 45 10 79 62 85 66 7 58 28 80 25 4 19 18 39 59 ...

output:

NO
NO
NO
NO
YES
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
NO
NO
NO
NO
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
NO
NO
NO
NO
NO
NO...

result:

ok 100000 token(s): yes count is 9102, no count is 90898

Test #83:

score: 0
Accepted
time: 140ms
memory: 69544kb

input:

100000 100000
1 2 3 4 5 6 7 8 9 10 6 3 4 7 10 8 6 14 6 19 1 3 17 23 16 5 9 3 4 3 21 25 4 33 29 25 15 15 38 18 37 32 43 25 12 14 35 45 39 49 13 36 13 30 11 30 22 6 46 53 12 41 9 17 48 38 18 33 17 59 49 70 72 29 50 13 51 29 2 5 53 51 80 27 38 12 57 70 37 42 82 5 6 36 49 62 44 90 41 73 12 68 10 61 39 6...

output:

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
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
YES
NO
YES
NO
YES
NO
NO...

result:

ok 100000 token(s): yes count is 11198, no count is 88802

Test #84:

score: 0
Accepted
time: 132ms
memory: 69552kb

input:

100000 100000
1 2 3 4 5 6 7 8 9 10 10 11 10 3 1 1 6 10 13 15 21 12 18 14 14 6 3 23 9 26 3 25 24 28 1 2 14 2 16 29 17 41 36 11 27 32 13 36 41 28 30 31 6 29 2 5 41 10 41 21 1 28 17 17 38 8 21 19 5 65 20 18 18 30 62 53 66 52 12 17 1 36 20 84 65 85 28 67 88 63 59 16 85 64 44 75 16 60 98 40 82 67 21 36 2...

output:

NO
NO
NO
NO
NO
YES
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
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
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...

result:

ok 100000 token(s): yes count is 8998, no count is 91002

Test #85:

score: 0
Accepted
time: 136ms
memory: 71580kb

input:

100000 100000
1 2 3 4 5 1 1 1 3 5 10 8 9 11 13 15 16 15 18 19 16 20 19 21 22 22 24 27 27 25 26 29 30 29 30 31 33 37 38 35 37 40 40 39 43 43 45 45 44 48 47 51 52 50 51 55 54 55 57 59 57 60 58 60 64 65 62 66 64 69 70 69 71 71 71 73 76 73 78 79 79 81 79 80 82 84 86 87 84 86 87 87 90 93 94 94 92 94 98 9...

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 token(s): yes count is 278, no count is 99722

Test #86:

score: 0
Accepted
time: 81ms
memory: 71244kb

input:

100000 100000
1 2 3 4 5 5 2 1 1 3 7 7 10 11 14 11 16 13 14 17 18 17 22 23 20 21 24 26 25 29 27 28 30 29 32 35 32 34 35 36 38 40 40 40 44 44 43 44 48 48 48 48 50 49 54 55 56 56 55 55 59 59 62 61 60 64 62 65 67 65 66 69 69 69 73 71 73 73 74 75 78 77 80 79 83 82 85 87 86 85 89 91 92 91 91 92 95 97 95 9...

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 token(s): yes count is 99964, no count is 36

Test #87:

score: 0
Accepted
time: 122ms
memory: 72048kb

input:

100000 100000
1 1 1 1 1 1 4 4 4 7 9 7 12 11 12 14 16 15 16 17 16 21 21 23 20 22 23 23 28 27 29 28 32 33 32 31 32 35 36 35 37 37 38 43 41 44 44 44 48 48 50 48 48 51 54 51 52 56 55 55 58 60 61 60 62 62 63 63 65 65 66 71 72 71 74 71 72 74 75 79 78 77 82 82 83 85 84 85 85 87 88 90 91 89 90 94 92 97 95 9...

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 token(s): yes count is 381, no count is 99619

Test #88:

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

input:

100000 100000
1 1 1 1 1 1 6 6 6 5 8 7 10 13 12 13 12 16 14 19 20 20 19 22 20 21 26 23 28 29 29 30 28 32 34 35 33 35 36 38 39 38 41 41 41 45 44 47 44 46 50 48 48 51 53 54 54 54 57 56 59 60 61 63 60 62 66 64 64 67 66 71 68 72 70 74 73 77 77 78 79 77 80 80 80 83 82 87 86 86 88 90 90 89 92 92 92 93 95 9...

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 token(s): yes count is 100000, no count is 0

Test #89:

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

input:

100000 100000
1 2 3 4 2 2 2 3 2 7 8 9 9 11 13 12 15 14 17 16 16 17 20 22 24 24 24 27 24 29 27 29 28 29 30 33 32 35 38 38 36 38 42 39 41 42 42 44 46 48 50 51 51 53 51 55 53 55 58 59 60 61 62 61 61 64 64 65 66 67 66 69 72 73 72 72 76 77 76 79 76 77 82 79 84 81 85 84 88 86 86 90 91 90 91 92 93 97 94 96...

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 token(s): yes count is 334, no count is 99666

Test #90:

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

input:

100000 100000
1 2 3 4 5 6 7 8 9 10 11 12 13 8 7 8 5 13 2 12 7 4 11 7 6 1 6 6 1 10 13 4 5 30 30 30 26 22 28 20 22 34 32 37 32 30 46 35 31 47 34 39 34 48 52 53 39 44 46 57 56 59 56 46 64 55 55 49 50 52 57 55 64 55 55 72 60 67 59 71 74 79 77 75 70 77 74 68 78 82 85 87 81 76 88 78 78 85 80 96 96 98 95 1...

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
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...

result:

ok 100000 token(s): yes count is 973, no count is 99027

Test #91:

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

input:

100000 100000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 6 13 1 2 1 3 3 10 5 3 10 8 12 3 1 4 4 9 3 18 18 27 18 34 28 31 29 36 39 31 28 33 44 48 35 37 45 46 44 41 52 46 40 51 53 43 51 55 50 60 56 61 52 52 51 51 58 61 60 56 66 61 70 73 61 80 71 68 79 81 84 79 76 79 81 85 75 75 80 83 80 96 96 98 86 83 84 85 1...

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 token(s): yes count is 99796, no count is 204

Test #92:

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

input:

100000 100000
1 2 3 4 5 6 3 1 5 5 4 4 3 4 6 1 5 1 3 6 4 6 6 4 4 2 10 21 18 16 15 14 19 31 34 27 32 29 28 36 34 41 35 25 34 41 37 30 31 48 41 48 43 52 50 51 38 52 50 44 49 52 54 44 59 46 64 49 55 64 52 64 63 72 63 59 75 74 74 72 71 79 78 72 77 83 86 81 71 89 77 81 76 89 90 83 88 93 89 85 99 86 89 101...

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 token(s): yes count is 694, no count is 99306

Test #93:

score: 0
Accepted
time: 117ms
memory: 71640kb

input:

100000 100000
1 2 3 4 5 6 7 8 9 10 2 4 10 8 8 3 6 4 4 7 10 7 7 4 8 10 6 6 6 10 24 20 30 23 17 24 24 33 30 23 30 35 26 33 27 45 27 46 40 40 31 37 50 34 42 51 43 40 41 49 49 58 52 51 53 52 49 60 67 66 53 65 71 54 56 59 62 65 62 74 62 63 67 73 83 83 70 87 73 83 74 83 84 75 91 79 94 93 98 81 91 89 93 88...

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 token(s): yes count is 668, no count is 99332

Test #94:

score: 0
Accepted
time: 105ms
memory: 71224kb

input:

100000 100000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 13 2 1 1 3 6 14 6 13 6 5 3 1 14 13 1 14 8 9 23 22 26 24 20 37 21 35 30 33 31 38 42 41 32 39 50 41 44 49 44 53 52 44 42 40 50 44 50 50 47 63 51 48 51 67 60 66 63 70 58 58 61 68 63 69 65 65 65 74 69 85 83 80 71 75 88 87 90 88 76 80 82 93 96 92 82 95 93 ...

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 token(s): yes count is 773, no count is 99227

Test #95:

score: 0
Accepted
time: 177ms
memory: 70188kb

input:

100000 100000
97761 66244 44083 46440 38737 1970 91153 10010 5300 94508 16738 26721 34428 76002 13809 62560 47936 5356 99585 87279 6873 41027 82269 78440 21089 54371 68003 12576 30632 59194 24091 68052 55617 8025 12248 4777 8318 61346 23713 20269 29470 9066 81067 97179 9447 27705 70766 11532 41283 3...

output:

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

result:

ok 100000 token(s): yes count is 26556, no count is 73444

Test #96:

score: 0
Accepted
time: 185ms
memory: 70484kb

input:

100000 100000
61333 36670 96079 33616 15333 63707 12972 63024 84569 87617 84483 25644 40813 16067 76150 12449 79009 60581 30193 21422 11093 26752 8272 94143 25300 14693 9164 87903 47824 23195 69314 65045 94752 25920 98522 50254 40716 28349 73377 24592 7851 71717 91342 86772 21660 92385 39592 76798 2...

output:

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

result:

ok 100000 token(s): yes count is 27541, no count is 72459

Test #97:

score: 0
Accepted
time: 176ms
memory: 69788kb

input:

100000 100000
23301 42466 62294 69323 18488 43877 34827 41073 31324 80177 57496 92595 71873 46379 88079 72625 54175 91646 76462 62409 88083 90840 46781 27568 54773 98550 13449 647 24116 96355 30759 17872 65047 23824 2172 33692 57949 97983 32300 25706 38062 56916 31922 45766 90627 58973 30562 16055 2...

output:

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

result:

ok 100000 token(s): yes count is 30820, no count is 69180

Test #98:

score: 0
Accepted
time: 191ms
memory: 70212kb

input:

100000 100000
45322 46659 79981 34608 28628 34467 68489 29788 50643 5829 3292 96089 28279 36569 59833 33912 86713 567 72157 5436 70192 79143 13627 15954 26862 67034 19381 80991 57985 73361 21740 8607 9426 42128 40604 62759 10728 9833 97813 54255 7049 86674 56552 19827 3300 75341 17442 70413 41615 81...

output:

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

result:

ok 100000 token(s): yes count is 22343, no count is 77657

Test #99:

score: 0
Accepted
time: 181ms
memory: 70608kb

input:

100000 100000
61067 60516 93761 78691 43983 71278 92983 44134 12155 28028 57790 33781 36555 10506 33566 92685 85820 25034 54784 77153 26371 28721 44579 4621 17319 19127 90333 56624 5407 77011 22630 46348 82601 79951 47478 93823 41756 36460 42045 80221 85328 60822 34911 57465 94758 11580 2288 21030 5...

output:

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

result:

ok 100000 token(s): yes count is 23459, no count is 76541

Test #100:

score: 0
Accepted
time: 179ms
memory: 69432kb

input:

100000 100000
35179 57849 17725 30372 48622 8019 72296 71818 34269 27840 33744 82490 81035 36506 19212 12152 17643 4638 51435 16753 72969 42566 46975 47785 26866 71636 22498 20982 14437 32458 37577 319 13128 78382 74639 12016 39355 23742 13385 79141 47879 43022 72902 98913 67211 38387 76127 90115 44...

output:

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

result:

ok 100000 token(s): yes count is 42091, no count is 57909

Test #101:

score: 0
Accepted
time: 183ms
memory: 69804kb

input:

100000 100000
20500 76142 78288 24782 9840 57166 88680 1829 24538 98108 2097 95779 42038 14048 87262 12384 64155 32582 43334 20199 38348 28040 34927 676 68539 59209 4125 59595 39403 22125 96611 89843 21779 19191 78184 96972 99452 24780 5325 69059 20822 18689 30386 60274 48177 72187 37046 31575 29043...

output:

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

result:

ok 100000 token(s): yes count is 44087, no count is 55913

Test #102:

score: 0
Accepted
time: 173ms
memory: 70152kb

input:

100000 100000
48079 91855 94986 15650 78438 99355 89734 62237 84051 56704 69017 29873 62108 13972 50318 11875 9685 84811 86970 84870 96101 9084 34266 28698 98647 48663 18800 21794 30070 73403 53223 91040 52618 88490 22267 77262 75640 34863 29455 52343 66688 20069 29839 20874 77425 7902 96504 54506 1...

output:

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

result:

ok 100000 token(s): yes count is 46864, no count is 53136

Test #103:

score: 0
Accepted
time: 151ms
memory: 70248kb

input:

100000 100000
96847 6894 46289 24596 84298 7729 15194 11287 21947 25062 11262 90988 29385 75077 97897 72758 2770 1093 52195 25666 84796 85518 20499 71895 72135 9150 36769 85009 86792 74650 61476 75873 48220 59057 73966 15044 70231 30498 92661 37673 91940 91187 78509 64797 4382 91120 48643 67609 3189...

output:

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

result:

ok 100000 token(s): yes count is 44028, no count is 55972

Test #104:

score: 0
Accepted
time: 188ms
memory: 70028kb

input:

100000 100000
16903 43400 19536 38042 66099 95510 33772 98463 39722 6989 63815 32412 16707 42259 65538 35325 2641 54145 72940 67232 99988 66179 82964 11732 85007 57659 95496 24006 429 67646 65741 8048 95724 10901 42653 77018 89912 29909 99091 54016 17092 67729 41782 72298 66316 45803 36988 72233 880...

output:

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

result:

ok 100000 token(s): yes count is 39700, no count is 60300

Test #105:

score: 0
Accepted
time: 154ms
memory: 71884kb

input:

100000 100000
18155 77988 55887 97330 4892 76925 40132 94721 76164 86721 89800 62817 42166 30513 38316 4929 37106 86067 88101 87216 61635 12657 73530 61887 14359 23383 13707 22830 90538 92962 35924 35080 75937 10346 7434 34475 25110 90861 41723 85736 12909 10361 96931 77991 24135 7584 25228 13980 81...

output:

YES
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
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
YES
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
YE...

result:

ok 100000 token(s): yes count is 24231, no count is 75769

Test #106:

score: 0
Accepted
time: 151ms
memory: 72812kb

input:

100000 100000
19580 18137 35032 20749 68924 82391 78794 52772 20056 40908 61060 30678 95932 30538 68083 33894 2263 55212 6883 94854 62867 14821 14413 13425 61245 79422 20760 96828 20949 87906 49063 97443 55276 99376 1666 60806 6813 22738 11451 84316 96195 32583 18141 11179 86119 58719 32008 12830 46...

output:

NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
YES
YES
YES
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
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
YES
NO
NO
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
NO
NO
YES
Y...

result:

ok 100000 token(s): yes count is 19510, no count is 80490

Test #107:

score: 0
Accepted
time: 148ms
memory: 72268kb

input:

100000 100000
8225 55068 10653 83374 84960 11035 27413 81169 45506 19570 34329 4841 81536 62756 15125 60848 72031 29887 84986 9882 72302 69012 62017 39620 3233 24481 93456 24410 29831 33542 49358 83439 43625 12404 30774 26742 93909 11634 67345 72875 2156 68970 68822 51601 4565 32495 33695 92052 6701...

output:

NO
NO
NO
NO
YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
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
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
YES
NO
YES
NO
NO
NO
NO
YES
YES
YES
NO
YES
YES
NO
NO
NO
NO
YES
NO
NO
YES
NO
N...

result:

ok 100000 token(s): yes count is 18300, no count is 81700

Test #108:

score: 0
Accepted
time: 172ms
memory: 72360kb

input:

100000 100000
63696 92639 67956 87934 78738 1798 38579 32227 2664 39926 39170 44126 80474 23499 98693 69384 87648 85120 80053 66196 18193 92748 12459 5363 81913 95717 1306 50332 43101 53799 61157 18337 66803 69668 52966 12882 52304 51463 64225 1949 24632 64909 78092 67013 51890 48218 52366 71245 847...

output:

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

result:

ok 100000 token(s): yes count is 18172, no count is 81828

Test #109:

score: 0
Accepted
time: 137ms
memory: 72192kb

input:

100000 100000
39077 9401 88457 29246 51930 36177 37924 41437 50664 19742 59923 27195 76959 3727 66287 41708 55915 40325 28088 92657 82843 75638 72902 8526 2665 13467 75639 98239 49181 33849 76149 82594 27055 30052 74809 58903 37872 40931 90525 76822 72880 44282 16619 45646 99205 80007 45953 36259 36...

output:

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
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
YES
NO
NO
NO
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
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
N...

result:

ok 100000 token(s): yes count is 23261, no count is 76739

Test #110:

score: 0
Accepted
time: 181ms
memory: 72188kb

input:

100000 100000
22987 24107 16845 15176 31450 84580 51982 26456 3893 4196 60824 78094 20553 47073 17828 37174 23363 71332 19314 52998 52964 75268 44631 96857 67402 98010 18000 45068 24599 12353 52861 67818 29287 59413 64538 30566 17750 50191 28535 25480 79684 48575 33231 14196 20683 12124 34579 25308 ...

output:

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
YES
NO
NO
YES
YES
NO
NO
NO
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
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO...

result:

ok 100000 token(s): yes count is 18697, no count is 81303

Test #111:

score: 0
Accepted
time: 154ms
memory: 71836kb

input:

100000 100000
73160 92095 27022 36841 81420 61310 50439 2775 41846 67312 5489 70119 26248 24396 29649 15464 46639 38783 40854 23760 70986 16255 57159 49333 19585 62912 58899 58995 33860 18825 2877 80010 30241 36256 15249 33184 349 21423 80325 79719 88322 15617 29207 50870 48199 86570 81527 43378 968...

output:

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

result:

ok 100000 token(s): yes count is 20651, no count is 79349

Test #112:

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

input:

100000 100000
77774 62384 79105 30340 46912 18876 24065 3858 21616 23413 65090 79638 38692 23696 43462 75075 33484 10529 63307 68881 92344 2734 31518 5381 54887 95088 111 62682 73665 80866 23034 95871 67211 74747 63096 13633 43114 13898 58160 3959 35258 44681 22194 88176 59979 70517 30529 54664 3876...

output:

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

result:

ok 100000 token(s): yes count is 22614, no count is 77386

Test #113:

score: 0
Accepted
time: 165ms
memory: 72060kb

input:

100000 100000
91177 4960 74750 68840 41663 58613 16622 7109 12899 53092 76198 29315 999 21234 63145 61756 79056 38364 78965 51873 63578 57066 57051 37317 5969 34276 352 84601 30147 83161 87668 69995 76124 52615 23582 49742 99270 11183 93147 75107 73724 1645 40265 68817 61021 26771 52534 61122 72928 ...

output:

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

result:

ok 100000 token(s): yes count is 20632, no count is 79368

Test #114:

score: 0
Accepted
time: 173ms
memory: 71912kb

input:

100000 100000
33847 26394 21960 89811 72368 37493 10250 71265 20805 71369 39191 5680 43479 2845 35421 37454 43483 7985 59330 57598 79011 61123 69457 30150 32296 75853 97462 16758 74920 72603 18491 2695 19266 49051 26261 45847 50240 33167 56392 89714 63472 19995 49795 24064 68388 93603 77515 92194 67...

output:

NO
NO
NO
YES
NO
YES
YES
NO
YES
NO
YES
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
YES
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
N...

result:

ok 100000 token(s): yes count is 21164, no count is 78836

Test #115:

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

input:

100000 100000
89014 10639 80383 5763 16760 24662 82952 50498 34377 82276 65972 51505 5423 23107 84877 49407 66035 59282 78117 26817 70997 36810 18566 53008 86460 68580 5476 16124 15866 91123 38960 37141 50443 14112 61101 74483 67289 69116 84928 52999 93240 18449 94597 44413 78049 72841 21376 73038 5...

output:

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
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
NO
YES
YES
YES
NO
YES
Y...

result:

ok 100000 token(s): yes count is 95043, no count is 4957

Test #116:

score: 0
Accepted
time: 115ms
memory: 71324kb

input:

100000 100000
89127 17474 9245 36593 67396 65329 6390 55102 75663 20787 70955 7348 9502 19560 91155 22259 69915 18178 49000 17985 27500 92344 11242 35376 83409 75629 25817 93319 61312 13156 56711 13946 45306 63523 1042 98126 26638 92785 68900 33388 24503 31588 77708 46433 49662 10179 47720 41205 987...

output:

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
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
YES
YES
YES
YES
YES
YES
YES
YES
YE...

result:

ok 100000 token(s): yes count is 97152, no count is 2848

Test #117:

score: 0
Accepted
time: 174ms
memory: 71236kb

input:

100000 100000
59165 63548 55442 32548 73682 38298 36844 21382 22097 35916 68728 49655 77803 45967 19895 33916 29225 5340 16297 62753 5276 18992 43575 81577 8545 60378 28455 37089 41680 39403 34628 30261 16933 62043 23574 49701 90800 6074 42324 45449 43693 99888 57180 72256 59107 54783 45185 80737 64...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
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
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
YES
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
N...

result:

ok 100000 token(s): yes count is 8891, no count is 91109

Test #118:

score: 0
Accepted
time: 185ms
memory: 71104kb

input:

100000 100000
34017 18448 61279 13059 35564 25714 73932 809 2852 72467 67146 41224 63302 12586 21739 26739 63802 18829 25890 14489 79584 63023 73671 93538 14521 55163 47757 47967 24923 51016 65406 13763 39807 32346 28089 58276 85794 58230 97318 5799 32222 42991 26915 94099 86402 67958 43231 20213 43...

output:

NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
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
YES
NO
YES
NO
NO
NO
NO
YES
NO
YES
NO
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
N...

result:

ok 100000 token(s): yes count is 9941, no count is 90059

Test #119:

score: 0
Accepted
time: 178ms
memory: 71152kb

input:

100000 100000
66011 11515 94795 63226 88329 11164 14660 24493 30632 39723 50336 10162 23631 74051 16764 84842 24406 50441 918 81721 27885 12368 55266 51427 89539 43606 53596 13660 33061 49425 45899 32046 34471 29960 81717 1652 33427 41050 2634 87155 12437 36552 21098 99471 44200 36427 61646 37172 32...

output:

NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
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
NO
NO
NO
NO
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...

result:

ok 100000 token(s): yes count is 8236, no count is 91764

Test #120:

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

input:

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

output:

NO
YES
YES

result:

ok 3 token(s): yes count is 2, no count is 1

Test #121:

score: 0
Accepted
time: 21ms
memory: 53320kb

input:

10 10
3 8 7 3 7 6 4 1 9 10
3 3 2 6 7 6 5 5 10 10
1 5
10 4
10 2
7 6
8 7
3 4
10 5
5 5
2 6
8 5

output:

YES
NO
NO
NO
YES
NO
NO
YES
NO
YES

result:

ok 10 token(s): yes count is 4, no count is 6

Test #122:

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

input:

1000 1000
255 386 727 525 995 895 302 119 818 316 362 415 441 801 488 435 134 564 844 252 794 978 705 672 212 469 766 673 356 264 922 185 265 906 231 936 907 128 279 666 699 756 694 854 65 627 727 897 551 152 378 422 130 386 85 694 183 378 155 718 912 66 711 732 552 571 356 870 605 934 316 471 389 3...

output:

YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
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
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
...

result:

ok 1000 token(s): yes count is 904, no count is 96

Test #123:

score: 0
Accepted
time: 21ms
memory: 52248kb

input:

10 10
1 5 10 1 2 5 10 7 10 8
3 10 10 7 5 3 4 4 4 2
4 1
6 10
1 2
4 3
9 1
5 8
7 6
2 4
6 10
9 4

output:

NO
NO
NO
NO
YES
NO
YES
NO
NO
YES

result:

ok 10 token(s): yes count is 3, no count is 7

Test #124:

score: 0
Accepted
time: 238ms
memory: 77448kb

input:

100000 100000
25004 81392 20478 49660 17414 14957 65712 88814 64487 91619 67793 19913 76937 83990 76717 69057 1625 48314 97209 57110 48079 85303 97119 91968 98119 95483 50994 21997 55309 87944 76729 90660 6758 23269 48601 89831 68303 29491 7869 70312 49983 41183 77356 65646 9164 43033 49359 54895 94...

output:

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

result:

ok 100000 token(s): yes count is 27327, no count is 72673

Test #125:

score: 0
Accepted
time: 253ms
memory: 81868kb

input:

100000 100000
6285 72721 48837 7001 75954 41016 90233 62657 21304 86155 75331 21102 9936 57451 83743 74055 81513 39275 63340 35984 58232 10200 44076 6260 17187 16118 7891 48685 54360 7691 63552 58328 98279 10753 55215 63561 40801 38677 22584 50243 93084 39184 86537 19347 4611 19319 73548 71031 89349...

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 token(s): yes count is 267, no count is 99733

Test #126:

score: 0
Accepted
time: 135ms
memory: 70484kb

input:

100000 100000
1 2 3 4 5 3 5 5 3 5 2 2 4 4 3 5 1 5 1 5 2 1 1 5 5 9 7 11 18 18 18 31 29 30 25 18 20 21 21 28 39 37 23 34 37 27 31 41 33 45 49 43 49 43 38 46 40 42 42 47 52 44 53 59 60 56 51 64 68 52 63 56 71 68 61 63 70 60 74 65 72 77 67 66 65 85 73 78 78 77 71 74 89 93 79 76 84 96 91 92 88 87 95 100 ...

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
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...

result:

ok 100000 token(s): yes count is 892, no count is 99108

Test #127:

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

input:

10 10
7 8 10 5 10 10 2 2 9 5
9 6 8 3 10 8 8 4 8 5
10 9
9 10
1 1
10 3
8 5
9 10
5 3
5 9
4 8
3 3

output:

NO
NO
YES
NO
NO
NO
NO
NO
NO
YES

result:

ok 10 token(s): yes count is 2, no count is 8