Source Code
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define sim template <class c
#define ris return *this
#define dor > debug& operator<<
#define eni(x) sim > typename enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) {
    return rge<c>{i, j};
}
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
    ~debug() {
        cerr << endl;
    }
    eni(!=) cerr << boolalpha << i;
    ris;
} eni(==) ris << range(begin(i), end(i));
}
sim, class b dor(pair<b, c> d) {
    ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it)
        *this << ", " + 2 * (it == d.b) << *it;
    ris << "]";
}
#else
    sim dor(const c&) {
        ris;
    }
#endif
}
;
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

const int K = 20;
const int N = 200200;

int h[N];
int deg[N];
int anc[N][K];
int best1[N];
int best2[N];
int best3[N];
vector<int> adj[N];

void dfs(int x = 1, int p = 0) {
    h[x] = h[p] + 1;
    best1[x] = (deg[x] > 2 ? x : best1[p]);
    best2[x] = best2[p];
    if (!best2[x] && deg[x] > 2) {
        best2[x] = x;
    }
    for (int y : adj[x]) {
        dfs(y, x);
    }
    if (adj[x].size() == 1) {
        best3[x] = best3[adj[x][0]];
    } else if (adj[x].size() > 1) {
        best3[x] = x;
    }
}

int lca(int x, int y) {
    if (h[x] < h[y]) {
        swap(x, y);
    }

    for (int j = K - 1; ~j; --j) {
        if (h[x] - (1 << j) >= h[y]) {
            x = anc[x][j];
        }
    }

    for (int j = K - 1; ~j; --j) {
        if (anc[x][j] != anc[y][j]) {
            x = anc[x][j];
            y = anc[y][j];
        }
    }

    if (x != y) {
        x = anc[x][0];
        y = anc[y][0];
    }

    return assert(x == y), x;
}

int dist(int x, int y) {
    return h[x] + h[y] - 2 * h[lca(x, y)];
}

bool is_parent(int x, int p) {
    return lca(x, p) == p;
}

int main() {
    int n, q;
    cin >> n >> q;

    for (int x = 2; x <= n; x++) {
        scanf("%d", &anc[x][0]);
        deg[x]++;
        deg[anc[x][0]]++;
        adj[anc[x][0]].push_back(x);
    }

    dfs();

    for (int j = 1; j < K; j++) {
        for (int x = 1; x <= n; x++) {
            anc[x][j] = anc[anc[x][j - 1]][j - 1];
        }
    }

    while (q--) {
        int x, y;
        scanf("%d%d", &x, &y);

        if (x == y) {
            puts("yes");
            continue;
        }

        bool leaf = (adj[y].empty());

        if (!leaf) {
            if (y == 1) {
                int b = best3[y];
                if (b) {
                    puts(dist(y, b) < dist(x, b) ? "yes" : "no");
                } else {
                    puts("no");
                }
            } else {
                puts("yes");
            }
        } else {
            int b = best1[y];
            if (b) {
                puts(dist(y, b) < dist(x, b) ? "yes" : "no");
            } else {
                b = best2[x];
                if (b) {
                    puts(dist(y, b) < dist(x, b) ? "yes" : "no");
                } else {
                    puts("no");
                }
            }
        }
    }
}

/*
6 100
1 2 2 3 3

4 1
1 2 3
4 2

*/
Copy
Escape from TarkZoo Baraa_Armoush
GNU G++17
69 ms
22.7 MB
Accepted
Test Case #1
3 ms
5.1 MB
Accepted
Input
6 4
1 2 2 3 3
1 2
5 1
6 1
6 5
Output
yes
yes
yes
no
Judge Output
yes
yes
yes
no
Checker Message
4 tokens
Test Case #2
3 ms
5.1 MB
Accepted
Input
4 4
1 2 3
1 3
2 4
1 4
2 3
Output
yes
no
no
yes
Judge Output
yes
no
no
yes
Checker Message
4 tokens
Test Case #3
26 ms
10.3 MB
Accepted
Input
43011 41896
1 2 3 4 3 4 3 6 9 7 6 12 12 4 13 8 10 18 14 20 15 15 23 16 24 17 24 5 12 13 19 18 30 23 19 25 35 29 37 24 15 29 25 28 29 24 40 42 47 32 18 44 42 46 53 54 54 15 50 53 48 62 49 39 26 34 59 57 30 65 33 40 58 65 48 35 23 69 35 33 75 60 25 62...
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
y...
Judge 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
y...
Checker Message
41896 tokens
Test Case #4
47 ms
12.5 MB
Accepted
Input
59139 99252
1 2 3 3 2 5 6 5 8 3 11 5 5 12 13 10 12 6 10 17 21 22 8 23 20 21 7 5 23 17 14 32 30 28 19 11 12 21 33 12 23 36 19 38 22 30 34 40 29 23 29 39 12 49 54 52 49 58 30 38 43 43 42 62 51 64 24 58 54 40 60 44 36 21 60 53 57 27 76 65 77 59 16 37 ...
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
y...
Judge 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
y...
Checker Message
99252 tokens
Test Case #5
15 ms
6.6 MB
Accepted
Input
9859 48096
1 2 3 4 5 1 3 4 4 9 7 12 9 10 11 11 16 12 19 14 15 16 8 19 15 26 5 28 18 24 22 20 30 33 33 23 34 29 37 37 11 42 11 29 20 23 24 40 37 42 40 43 27 48 55 51 28 39 47 7 22 61 10 54 18 51 67 54 44 66 24 46 67 49 73 63 77 69 76 79 78 58 72 68 ...
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
y...
Judge 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
y...
Checker Message
48096 tokens
Test Case #6
26 ms
8.6 MB
Accepted
Input
25987 64237
1 2 3 1 5 5 5 2 5 10 2 7 12 5 11 14 11 14 17 10 21 19 7 14 5 9 3 10 26 26 8 17 27 30 33 7 8 20 34 30 20 13 10 39 4 41 46 44 2 23 27 37 44 51 24 50 45 35 47 33 54 42 59 24 48 34 42 55 47 42 55 60 64 66 29 63 77 60 37 54 66 40 69 52 15 78 ...
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
y...
Judge 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
y...
Checker Message
64237 tokens
Test Case #7
8 ms
6.6 MB
Accepted
Input
9411 13081
1 1 3 4 5 6 3 8 6 2 9 7 7 13 10 15 15 18 14 20 14 20 7 21 22 21 27 6 22 15 19 32 30 8 4 26 19 23 37 22 5 38 42 23 45 37 40 42 21 23 27 41 24 30 26 37 39 52 25 58 39 61 54 54 65 64 34 50 35 65 19 63 44 23 46 74 51 76 49 70 67 42 52 82 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
yes
yes
yes
yes
y...
Judge 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
y...
Checker Message
13081 tokens
Test Case #8
17 ms
8.6 MB
Accepted
Input
25539 29221
1 2 3 4 4 4 6 7 6 9 5 8 11 9 9 8 9 5 10 2 20 12 23 16 18 23 27 11 5 19 30 20 31 20 27 36 36 10 34 8 37 41 26 40 40 31 30 40 40 36 50 24 22 28 27 36 57 50 35 56 33 41 35 32 44 44 22 52 31 41 46 64 72 49 65 34 73 42 50 63 80 40 47 54 66 67...
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
y...
Judge 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
y...
Checker Message
29221 tokens
Test Case #9
28 ms
14.3 MB
Accepted
Input
76259 10770
1 2 3 3 4 6 2 8 9 10 10 10 2 5 7 10 12 9 5 18 13 10 23 10 11 11 14 16 25 22 15 5 30 27 27 25 14 28 30 36 40 33 35 25 35 36 17 38 45 36 50 30 41 33 38 35 35 24 50 42 50 60 33 12 62 33 47 47 55 64 70 16 69 64 74 34 73 76 39 25 44 82 13 20 ...
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
y...
Judge 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
y...
Checker Message
10770 tokens
Test Case #10
43 ms
16.4 MB
Accepted
Input
92387 35422
1 1 3 2 3 2 6 7 9 8 6 9 8 14 6 12 12 11 17 11 20 19 23 23 24 20 21 14 13 28 28 31 31 23 14 35 26 8 34 29 35 24 13 40 34 30 38 33 26 50 40 21 48 38 39 11 27 18 56 53 46 40 31 44 22 63 63 49 16 35 48 41 51 23 72 48 45 68 50 62 47 5 82 71 ...
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
y...
Judge 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
y...
Checker Message
35422 tokens
Test Case #11
16 ms
6.7 MB
Accepted
Input
8515 51563
1 2 2 2 3 5 4 6 3 5 11 11 12 11 15 14 14 15 14 7 12 11 17 19 21 22 21 12 24 30 10 19 4 14 30 23 12 21 30 20 30 28 43 26 28 46 36 33 35 35 40 27 25 36 40 30 49 35 30 37 27 59 19 7 59 51 58 43 64 60 63 29 22 47 35 62 69 50 52 22 19 82 68 41...
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
y...
Judge 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
y...
Checker Message
51563 tokens
Test Case #12
29 ms
16.1 MB
Accepted
Input
91939 407
1 2 3 4 2 2 6 5 9 7 7 9 5 7 15 16 16 17 9 19 19 15 6 15 15 10 20 17 19 16 30 3 31 4 30 7 23 6 35 40 34 15 27 36 20 42 21 40 47 27 48 17 35 40 41 46 20 31 39 60 56 38 52 58 34 33 53 45 66 39 37 31 61 65 50 62 39 68 67 49 24 70 65 79 72 32 ...
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
y...
Judge 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
y...
Checker Message
407 tokens
Test Case #13
35 ms
9.5 MB
Accepted
Input
30518 96518
1 2 2 4 2 6 4 6 7 4 4 8 11 12 12 16 16 16 14 12 19 14 22 13 22 9 27 12 29 21 26 3 28 20 20 14 35 28 29 23 37 40 26 30 25 18 13 43 23 35 41 51 35 38 36 12 40 10 27 58 26 41 61 46 52 56 56 45 36 69 50 68 28 49 39 48 62 44 32 79 29 82 64 64...
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
y...
Judge 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
y...
Checker Message
96518 tokens
Test Case #14
21 ms
10.9 MB
Accepted
Input
46646 21171
1 2 3 4 5 6 7 4 8 5 9 9 4 9 10 8 17 17 10 19 11 17 16 20 18 11 26 17 19 23 16 31 32 15 34 25 27 19 34 11 41 2 21 44 15 39 43 41 20 50 5 9 23 36 37 47 33 31 52 44 16 60 56 42 20 41 15 39 18 47 17 29 18 64 53 62 61 51 53 54 32 73 45 46 78 ...
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
y...
Judge 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
y...
Checker Message
21171 tokens
Test Case #15
20 ms
9.1 MB
Accepted
Input
30070 37311
1 2 1 3 5 4 4 3 9 10 6 9 9 14 10 10 13 3 19 19 18 20 16 16 11 22 13 8 12 10 28 25 28 24 33 35 33 32 30 37 36 21 36 31 44 34 38 45 38 44 28 41 33 40 29 46 36 27 58 23 51 40 50 60 49 14 64 41 24 68 45 31 43 17 67 73 22 69 55 78 77 72 40 82...
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
y...
Judge 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
y...
Checker Message
37311 tokens
Test Case #16
17 ms
8.3 MB
Accepted
Input
13494 86155
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 ...
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
y...
Judge 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
y...
Checker Message
86155 tokens
Test Case #17
69 ms
16.9 MB
Accepted
Input
96918 67704
1 2 1 3 4 3 5 8 5 9 7 9 13 10 9 14 11 13 14 13 18 14 18 23 20 14 26 17 18 18 26 31 28 5 6 8 31 27 30 22 35 11 43 32 38 33 13 40 24 50 50 39 7 43 40 31 15 45 41 51 29 39 26 29 31 40 57 37 40 67 42 53 69 65 41 20 56 38 47 44 79 60 78 84 70...
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
y...
Judge 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
y...
Checker Message
67704 tokens
Test Case #18
25 ms
7.3 MB
Accepted
Input
13046 83844
1 1 2 2 4 6 7 7 6 6 11 10 7 5 6 16 13 15 9 9 8 17 18 19 15 16 25 15 27 25 16 24 29 16 4 22 35 17 26 5 28 37 28 7 33 27 39 38 41 38 20 43 25 46 41 30 52 54 49 60 57 58 8 51 63 13 51 28 37 45 63 54 51 24 55 44 77 60 56 71 60 58 76 71 84 64...
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
y...
Judge 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
y...
Checker Message
83844 tokens
Test Case #19
19 ms
9.0 MB
Accepted
Input
29174 32688
1 2 3 3 3 3 5 6 5 9 9 12 12 13 15 6 9 16 3 20 17 8 18 15 8 23 12 13 23 27 24 15 32 24 15 12 16 20 30 35 21 40 36 33 32 44 34 38 19 26 41 37 43 49 42 54 46 51 10 47 43 37 59 28 40 55 45 31 59 66 35 56 21 48 68 44 51 76 64 76 61 57 60 34 ...
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
y...
Judge 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
y...
Checker Message
32688 tokens
Test Case #20
34 ms
14.9 MB
Accepted
Input
79894 24637
1 2 3 4 2 6 2 5 8 6 4 12 6 9 15 10 16 6 17 20 7 18 22 21 23 26 11 18 2 17 11 26 29 20 15 28 34 16 26 29 27 32 36 12 12 26 17 33 28 38 16 31 22 19 50 54 40 27 38 28 22 57 48 55 50 40 40 22 49 43 61 59 73 63 15 59 73 61 72 50 44 43 57 76 ...
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
y...
Judge 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
y...
Checker Message
24637 tokens
Test Case #21
42 ms
22.7 MB
Accepted
Input
96022 73481
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 ...
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
y...
Judge 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
y...
Checker Message
73481 tokens
Test Case #22
43 ms
14.9 MB
Accepted
Input
79446 55030
1 2 2 4 5 5 7 4 2 8 6 3 13 13 13 14 15 12 11 10 4 6 15 11 13 24 9 23 14 23 31 32 32 33 20 30 32 38 26 40 41 41 2 14 42 39 39 36 23 13 45 30 40 31 51 41 36 37 58 53 39 56 33 63 46 49 19 9 41 46 56 71 19 51 56 68 45 18 66 48 49 39 78 78 73...
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
y...
Judge 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
y...
Checker Message
55030 tokens
Test Case #23
22 ms
6.4 MB
Accepted
Input
5440 88704
1 2 3 3 5 2 6 6 6 6 9 3 9 9 11 13 3 3 18 19 13 18 23 23 15 24 24 20 13 30 31 10 29 29 17 14 19 30 37 35 33 26 7 37 23 21 24 31 35 14 51 39 46 36 53 52 44 54 53 37 48 51 26 39 40 27 34 39 31 60 67 35 53 72 60 22 59 78 49 76 71 68 53 71 39 ...
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
y...
Judge 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
y...
Checker Message
88704 tokens
Test Case #24
18 ms
8.2 MB
Accepted
Input
21569 37548
1 2 1 2 5 4 3 5 8 10 4 11 12 12 9 15 11 8 15 16 19 9 18 19 7 13 8 23 29 9 24 23 29 25 32 31 26 15 9 28 37 30 41 21 12 41 41 31 49 14 34 43 51 35 20 18 38 19 59 49 31 24 55 62 17 60 53 42 50 32 54 51 48 37 73 41 59 22 51 36 72 54 64 54 59...
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
y...
Judge 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
y...
Checker Message
37548 tokens
Test Case #25
50 ms
14.3 MB
Accepted
Input
72289 86393
1 2 3 2 5 6 6 3 7 6 10 4 6 8 10 3 17 10 12 12 11 14 17 2 23 16 7 22 19 19 29 26 30 31 32 17 10 25 37 19 31 19 24 38 43 36 33 25 19 38 34 26 19 50 22 15 52 27 43 31 23 50 54 50 48 47 47 34 67 58 68 24 62 56 29 41 12 52 40 57 58 52 17 21 ...
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
y...
Judge 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
y...
Checker Message
86393 tokens
Test Case #26
38 ms
15.8 MB
Accepted
Input
88417 11045
1 1 3 2 4 4 2 4 9 10 7 11 12 14 8 7 9 13 7 8 19 22 8 21 18 23 17 28 12 23 21 9 29 10 35 33 23 14 10 40 36 40 18 10 42 6 21 21 29 13 17 32 50 53 24 48 33 40 42 57 54 22 48 25 56 26 63 37 42 29 45 44 59 71 46 56 54 70 51 80 60 54 83 57 18 ...
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
y...
Judge 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
y...
Checker Message
11045 tokens
Test Case #27
31 ms
13.9 MB
Accepted
Input
71841 27185
1 2 3 3 3 6 6 2 3 8 11 6 4 6 6 10 16 16 18 8 10 15 7 17 12 26 17 26 22 28 31 28 33 21 26 14 29 17 38 34 39 5 34 39 37 35 46 17 11 47 16 36 15 52 25 37 24 37 56 55 39 49 25 54 43 60 58 29 28 57 67 58 36 34 62 69 75 60 60 56 42 29 80 27 84...
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
y...
Judge 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
y...
Checker Message
27185 tokens
Test Case #28
51 ms
15.9 MB
Accepted
Input
87969 76030
1 2 3 4 3 3 2 8 5 9 8 5 8 13 3 14 10 18 16 19 18 22 19 23 25 15 23 22 17 13 24 31 29 16 26 29 21 12 11 26 34 36 30 13 31 29 38 10 49 38 39 30 28 7 37 34 43 48 13 40 13 19 23 45 53 46 53 32 53 33 39 61 68 54 71 68 75 39 68 79 75 26 66 76 ...
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
y...
Judge 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
y...
Checker Message
76030 tokens
Test Case #29
31 ms
14.0 MB
Accepted
Input
71393 24874
1 2 2 3 2 6 6 8 4 7 4 7 12 2 15 15 15 5 12 17 8 21 19 19 21 19 22 25 26 17 29 8 33 24 12 19 27 23 38 16 28 30 41 40 30 46 29 21 32 20 12 21 37 54 38 32 17 51 39 52 60 48 63 62 21 6 67 22 6 56 63 63 49 71 26 7 48 61 75 73 77 29 48 45 80 ...
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
y...
Judge 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
y...
Checker Message
24874 tokens
Test Case #30
39 ms
12.1 MB
Accepted
Input
54817 73719
1 2 2 1 5 1 4 7 6 2 10 8 4 12 14 16 8 9 7 10 17 14 23 14 16 26 27 24 22 24 21 28 30 30 10 31 34 36 35 38 33 34 38 15 23 29 21 21 47 47 25 5 44 53 39 31 55 9 53 36 34 16 57 44 59 60 42 26 68 25 36 9 45 35 52 40 71 66 61 29 64 77 60 81 77 ...
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
y...
Judge 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
y...
Checker Message
73719 tokens
Test Case #31
29 ms
13.9 MB
Accepted
Input
70945 22563
1 2 2 2 5 5 6 6 8 10 7 8 9 9 12 8 11 14 18 20 7 22 17 21 9 17 27 25 29 26 27 12 33 27 18 8 24 15 38 33 26 24 20 35 21 45 43 17 13 20 44 18 17 13 40 27 32 57 58 59 28 46 41 9 9 46 33 12 60 55 55 39 72 56 50 39 70 47 69 63 65 76 82 64 57 ...
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
y...
Judge 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
y...
Checker Message
22563 tokens
Test Case #32
23 ms
11.8 MB
Accepted
Input
54369 14511
1 2 3 3 2 1 3 4 9 7 10 8 2 11 12 10 5 16 15 20 16 8 17 16 23 19 26 28 20 8 17 17 33 17 33 30 31 36 35 25 17 29 35 17 8 41 38 48 25 20 49 51 29 38 48 54 52 27 34 58 47 13 39 54 45 25 22 32 62 12 27 25 56 70 65 55 41 66 70 26 49 77 80 83 ...
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
y...
Judge 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
y...
Checker Message
14511 tokens
Test Case #33
7 ms
6.1 MB
Accepted
Input
4555 13594
1 2 3 2 3 5 3 7 8 9 5 3 9 12 10 9 6 18 9 16 20 19 6 8 25 23 27 14 25 16 24 14 30 28 31 23 15 22 29 16 38 40 35 39 11 34 1 44 45 31 32 25 47 47 43 41 9 54 59 43 15 59 34 21 39 57 61 49 10 47 45 29 11 44 5 67 77 22 62 24 21 44 69 84 79 69 ...
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
y...
Judge 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
y...
Checker Message
13594 tokens
Test Case #34
15 ms
8.0 MB
Accepted
Input
20683 29734
1 1 3 4 2 6 6 6 7 7 9 8 12 8 7 12 6 10 19 12 13 11 6 23 21 26 26 28 11 20 29 30 30 34 20 34 33 30 24 38 32 32 14 23 7 14 43 40 25 41 39 30 53 41 44 27 53 18 44 20 51 39 59 52 59 42 29 44 46 10 65 47 58 61 36 13 77 52 34 61 72 21 52 62 31...
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
y...
Judge 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
y...
Checker Message
29734 tokens
Test Case #35
46 ms
14.1 MB
Accepted
Input
71403 78578
1 2 3 3 1 4 4 5 8 2 7 4 5 2 9 13 10 12 17 6 20 15 19 19 15 15 14 27 28 29 21 28 30 17 20 22 8 13 29 32 37 36 27 39 42 45 31 40 22 41 13 21 23 45 45 53 55 9 51 38 35 58 54 29 34 65 15 46 34 47 39 49 35 18 54 11 51 24 55 40 74 18 48 28 21 ...
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
y...
Judge 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
y...
Checker Message
78578 tokens
Test Case #36
32 ms
21.1 MB
Accepted
Input
87531 27423
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 ...
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
y...
Judge 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
y...
Checker Message
27423 tokens
Test Case #37
29 ms
13.9 MB
Accepted
Input
70955 19371
1 2 2 2 5 3 4 2 9 10 8 9 13 14 15 4 8 18 8 16 19 10 10 21 23 26 12 12 26 13 17 29 2 18 33 20 37 21 20 13 24 11 22 40 36 44 44 42 15 41 44 18 41 47 53 18 31 44 31 33 47 57 46 48 27 34 38 42 54 45 24 65 64 63 66 32 45 58 64 38 62 72 82 40 ...
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
y...
Judge 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
y...
Checker Message
19371 tokens
Test Case #38
18 ms
11.8 MB
Accepted
Input
54379 920
1 1 3 1 4 5 7 8 4 8 4 9 5 5 15 7 11 4 1 9 10 19 21 22 18 8 20 9 22 22 25 16 31 26 8 35 17 23 25 37 29 37 15 17 30 40 43 42 26 34 23 51 5 23 53 49 47 53 48 46 29 36 22 64 52 64 28 35 13 64 65 18 44 12 20 50 45 75 56 58 64 73 69 79 81 65 32 ...
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
y...
Judge 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
y...
Checker Message
920 tokens
Test Case #39
18 ms
9.9 MB
Accepted
Input
37803 17060
1 2 2 4 4 6 3 8 2 9 9 11 11 13 13 12 5 11 17 8 18 11 20 11 13 19 19 15 4 24 13 20 4 32 28 23 27 11 20 31 22 29 15 41 23 25 27 38 42 20 32 47 39 29 54 38 25 51 53 26 21 56 62 52 60 51 50 38 47 45 39 23 38 45 41 64 69 59 64 9 58 73 66 64 ...
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
y...
Judge 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
y...
Checker Message
17060 tokens
Test Case #40
36 ms
12.0 MB
Accepted
Input
53932 65904
1 1 2 4 3 4 7 8 5 10 6 10 3 10 13 14 9 13 13 20 10 15 20 24 25 26 19 17 26 11 27 29 7 12 28 31 12 34 26 23 10 32 28 19 21 39 24 36 20 34 42 43 52 27 23 35 10 8 25 42 43 34 57 37 48 34 66 30 65 69 57 44 69 61 54 61 38 47 66 57 39 59 47 18...
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
y...
Judge 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
y...
Checker Message
65904 tokens
Test Case #41
23 ms
17.9 MB
Accepted
Input
70060 14749
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 ...
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
y...
Judge 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
y...
Checker Message
14749 tokens
Test Case #42
12 ms
9.4 MB
Accepted
Input
20780 30889
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 ...
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
y...
Judge 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
y...
Checker Message
30889 tokens
Test Case #43
5 ms
6.0 MB
Accepted
Input
3670 5779
1 2 2 2 3 6 5 7 7 8 9 11 8 14 8 16 16 9 14 4 14 20 9 20 18 18 18 21 29 27 25 23 31 6 29 27 25 19 37 30 9 39 24 40 23 36 46 25 16 50 44 18 29 41 29 46 21 53 37 59 30 22 33 55 38 16 40 52 64 32 69 51 62 69 32 48 75 67 49 73 50 81 59 29 36 70...
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
y...
Judge 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
y...
Checker Message
5779 tokens
Test Case #44
35 ms
15.7 MB
Accepted
Input
87094 21920
1 2 3 4 2 4 7 6 6 5 6 10 11 11 8 5 8 12 12 19 20 22 9 16 12 26 17 19 19 29 13 27 31 19 18 5 32 27 33 22 38 12 37 32 21 18 36 16 37 50 7 51 37 3 39 53 57 17 51 30 58 49 21 46 58 56 31 54 66 56 37 64 73 30 48 48 75 24 51 29 27 70 69 77 77 ...
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
y...
Judge 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
y...
Checker Message
21920 tokens
Test Case #45
47 ms
14.0 MB
Accepted
Input
70518 70764
1 2 2 2 5 5 5 7 7 7 10 11 4 8 4 10 15 14 5 18 13 16 20 10 25 8 23 21 11 15 27 19 32 14 32 26 6 18 37 7 32 37 34 41 43 46 29 28 43 26 23 48 26 54 40 42 35 8 21 44 44 20 53 63 65 42 19 48 58 32 65 65 70 53 60 62 48 68 66 63 30 69 31 40 73 ...
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
y...
Judge 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
y...
Checker Message
70764 tokens
Test Case #46
30 ms
20.8 MB
Accepted
Input
86646 19609
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 ...
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
y...
Judge 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
y...
Checker Message
19609 tokens
Test Case #47
44 ms
13.9 MB
Accepted
Input
70070 68453
1 1 2 4 4 5 5 4 8 9 11 12 13 11 14 14 14 2 14 8 12 20 13 13 16 26 17 23 18 22 25 31 9 29 22 28 36 1 38 29 31 32 25 42 41 46 43 21 40 44 21 46 50 23 42 54 49 36 48 39 13 16 46 35 26 57 64 52 51 29 57 28 26 31 29 71 42 36 52 79 37 56 13 61...
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
y...
Judge 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
y...
Checker Message
68453 tokens
Test Case #48
45 ms
12.2 MB
Accepted
Input
53494 93105
1 2 3 4 4 6 7 8 2 10 9 5 7 7 14 15 16 7 11 20 19 13 12 4 9 7 16 18 26 2 30 19 31 34 35 35 28 20 34 20 23 22 25 28 31 41 35 16 38 26 30 41 14 21 50 22 19 47 9 12 40 47 21 59 40 41 58 47 49 57 32 47 63 54 46 26 41 73 68 42 40 55 71 84 65 ...
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
y...
Judge 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
y...
Checker Message
93105 tokens
Test Case #49
16 ms
9.8 MB
Accepted
Input
36918 9246
1 1 3 2 4 4 5 8 5 4 4 12 11 3 12 6 1 10 5 17 11 16 22 21 23 20 15 22 21 12 22 28 10 31 26 23 33 38 30 40 29 42 19 42 30 27 24 10 7 12 47 36 28 27 51 20 45 44 27 34 34 13 17 34 17 14 23 48 37 26 59 33 59 68 61 47 66 37 69 70 80 56 54 71 39...
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
y...
Judge 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
y...
Checker Message
9246 tokens
Test Case #50
33 ms
11.9 MB
Accepted
Input
53046 58090
1 2 1 3 3 6 1 8 3 9 10 7 13 12 12 10 15 15 17 16 18 6 21 10 19 21 15 24 3 21 18 31 9 25 26 5 14 19 34 34 21 12 34 29 19 41 47 48 34 44 6 39 45 40 45 40 39 6 37 47 60 45 61 58 35 56 49 43 41 55 8 39 71 32 74 47 34 44 76 40 60 37 65 50 31 ...
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
y...
Judge 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
y...
Checker Message
58090 tokens
Test Case #51
24 ms
13.5 MB
Accepted
Input
69174 6934
1 2 3 2 2 3 5 7 5 10 7 2 8 9 12 12 8 16 15 14 10 12 8 23 13 10 14 27 26 23 29 24 32 19 30 26 32 38 31 27 7 37 30 43 45 26 39 16 41 12 36 33 51 39 52 49 53 57 58 57 47 7 55 51 56 41 42 45 25 25 50 54 68 54 37 61 62 64 69 69 62 36 22 73 55 ...
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
y...
Judge 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
y...
Checker Message
6934 tokens
Test Case #52
21 ms
8.0 MB
Accepted
Input
19894 55779
1 1 3 4 5 6 1 6 4 8 11 8 13 3 11 14 17 18 11 9 18 20 20 19 25 13 21 25 12 26 21 32 9 5 29 33 5 6 35 18 18 29 26 30 41 18 31 16 46 11 36 38 34 43 53 48 48 26 21 43 28 44 38 14 43 29 33 38 67 55 31 55 64 67 52 70 62 14 70 15 45 33 9 52 18 ...
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
y...
Judge 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
y...
Checker Message
55779 tokens
Test Case #53
51 ms
14.0 MB
Accepted
Input
70081 97965
1 2 2 3 2 2 6 8 9 10 4 12 4 5 9 13 9 14 18 18 21 14 23 13 8 18 14 26 13 11 21 19 32 5 15 27 26 32 29 39 39 40 42 41 21 45 43 46 32 26 21 46 32 51 55 13 43 47 52 18 40 37 32 49 36 53 65 60 61 69 40 67 34 42 52 71 73 49 62 61 6 62 62 41 78...
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
y...
Judge 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
y...
Checker Message
97965 tokens
Test Case #54
42 ms
15.7 MB
Accepted
Input
86209 46810
1 1 2 4 5 3 3 6 5 8 10 7 11 13 6 15 14 15 17 15 15 22 12 4 23 21 21 25 29 15 27 4 32 29 31 15 11 24 33 34 33 32 39 34 18 32 37 44 46 38 21 41 40 54 55 47 16 56 23 37 15 57 30 6 47 37 60 62 41 48 63 25 52 61 66 21 72 18 63 75 70 46 58 79 ...
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
y...
Judge 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
y...
Checker Message
46810 tokens
Test Case #55
51 ms
14.0 MB
Accepted
Input
69633 95654
1 2 3 1 5 2 6 6 6 6 6 3 2 3 15 16 16 17 13 6 20 20 17 16 19 7 20 11 18 23 17 27 32 24 31 29 23 26 29 27 27 36 21 42 42 44 23 42 28 38 47 35 53 53 8 47 39 6 42 49 60 36 57 58 65 66 54 57 26 68 42 62 48 10 75 44 44 50 46 49 71 48 36 50 73 ...
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
y...
Judge 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
y...
Checker Message
95654 tokens
Test Case #56
42 ms
15.4 MB
Accepted
Input
85761 11794
1 1 1 4 2 5 3 5 6 7 11 8 8 12 15 8 10 18 7 19 13 13 7 10 13 20 26 7 11 29 29 30 33 30 20 12 29 16 24 17 32 27 13 28 41 40 12 38 35 47 18 29 22 27 28 54 32 30 49 31 35 56 51 38 43 53 15 59 67 46 59 72 12 45 40 44 68 56 56 74 73 46 30 84 ...
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
y...
Judge 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
y...
Checker Message
11794 tokens
Test Case #57
29 ms
10.1 MB
Accepted
Input
36481 60639
1 2 3 1 5 6 6 4 7 4 8 8 12 14 14 10 15 10 19 19 20 21 7 23 25 21 25 28 23 4 21 32 11 8 20 28 19 12 29 39 25 13 31 43 40 25 39 38 41 38 28 33 51 32 29 31 52 26 13 45 29 34 45 61 62 37 64 54 69 68 29 37 58 59 57 59 38 73 64 32 59 20 76 67 ...
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
y...
Judge 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
y...
Checker Message
60639 tokens
Test Case #58
27 ms
11.6 MB
Accepted
Input
52609 9483
1 2 3 3 5 4 3 5 6 5 5 9 2 11 13 13 13 12 16 16 12 6 14 13 21 7 25 11 17 18 27 21 33 20 25 8 27 15 25 33 16 20 43 30 30 15 33 33 17 30 46 37 19 30 30 30 27 40 39 25 57 55 37 49 38 65 59 56 62 45 57 53 36 74 68 68 37 57 72 9 61 24 73 27 40 ...
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
y...
Judge 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
y...
Checker Message
9483 tokens
Test Case #59
21 ms
9.8 MB
Accepted
Input
36033 34135
1 1 3 4 5 6 7 2 3 7 9 10 8 7 11 15 15 14 12 13 19 18 23 3 16 13 25 8 26 21 18 9 32 15 9 29 34 36 30 25 34 40 40 44 28 38 16 40 38 47 51 18 30 35 32 25 14 50 38 41 43 33 16 23 59 53 26 51 32 69 17 44 29 40 12 66 64 44 78 57 43 21 58 76 60...
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
y...
Judge 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
y...
Checker Message
34135 tokens
Test Case #60
42 ms
11.9 MB
Accepted
Input
52161 82980
1 2 3 4 4 3 4 8 9 2 6 10 13 13 13 16 11 16 9 8 11 8 23 7 9 21 24 12 21 27 25 15 13 32 8 19 24 14 25 14 28 32 22 31 27 14 46 40 43 41 34 25 46 39 41 24 44 2 58 52 38 54 60 53 33 37 50 53 55 43 52 58 64 62 18 76 28 65 66 80 46 74 54 53 31 ...
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
y...
Judge 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
y...
Checker Message
82980 tokens
Test Case #61
38 ms
10.1 MB
Accepted
Input
35585 99120
1 2 3 4 4 5 6 7 4 9 10 10 7 4 10 8 14 5 19 20 19 18 22 17 24 24 18 17 29 10 13 20 33 30 28 28 31 32 30 38 20 22 32 1 19 37 39 35 22 30 41 13 52 38 42 22 56 56 35 36 53 31 59 21 45 65 43 47 53 65 9 69 44 13 40 39 59 15 73 44 77 75 29 78 ...
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
y...
Judge 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
y...
Checker Message
99120 tokens
Test Case #62
19 ms
8.0 MB
Accepted
Input
19009 47965
1 2 3 4 3 3 5 7 2 10 8 10 11 7 10 10 16 9 16 20 10 17 21 11 19 13 24 9 20 14 22 8 13 26 28 10 36 13 26 31 26 42 43 32 45 32 29 33 32 41 17 22 33 52 43 41 52 54 42 48 50 53 43 11 27 53 35 49 43 41 42 70 39 41 57 39 59 65 79 71 79 74 75 60...
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
y...
Judge 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
y...
Checker Message
47965 tokens
Test Case #63
20 ms
10.8 MB
Accepted
Input
45004 14343
1 1 1 4 4 4 4 1 8 9 10 10 6 13 5 7 10 15 10 11 15 8 6 23 21 14 8 17 25 24 27 32 33 21 12 33 33 24 37 25 34 26 33 15 18 46 41 24 41 12 29 33 34 10 38 20 57 53 24 45 58 48 38 36 14 20 48 67 33 60 59 71 38 67 72 54 42 47 27 61 71 42 64 50 ...
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
y...
Judge 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
y...
Checker Message
14343 tokens