Problem: Bob has a simple undirected connected graph (without self-loops and multiple edges). He wants to learn whether his graph is bipartite (that is, you can paint all vertices of the graph into two colors so that there is no edge connecting two vertices of the same color) or not. As he is not very good at programming, he asked Alice for help. He does not want to disclose his graph to Alice, but he agreed that Alice can ask him some questions about the graph.

The only question that Alice can ask is the following: she sends s — a subset of vertices of the original graph. Bob answers with the number of edges that have both endpoints in s. Since he doesn't want Alice to learn too much about the graph, he allows her to ask no more than 20000 questions. Furthermore, he suspects that Alice might introduce false messages to their communication channel, so when Alice finally tells him whether the graph is bipartite or not, she also needs to provide a proof — either the partitions themselves or a cycle of odd length.

Your task is to help Alice to construct the queries, find whether the graph is bipartite. 

Input

The first line contains a single integer n (1 ≤ n ≤ 600) — the number of vertices in Bob's graph.

Interaction

First, read an integer n (1≤ n≤ 600) — the number of vertices in Bob's graph.

To make a query, print two lines. First of which should be in the format "? k" (1 ≤ k ≤ n), where k is the size of the set to be queried. The second line should contain k space separated distinct integers s_1, s_2, ..., s_k (1 ≤ s_i ≤ n) — the vertices of the queried set.

After each query read a single integer m (0 ≤ m ≤ (n(n-1))/(2)) — the number of edges between the vertices of the set \\{s_i\}.

You are not allowed to ask more than 20000 queries.

If m = -1, it means that you asked more queries than allowed, or asked an invalid query. Your program should immediately terminate (for example, by calling exit(0)). You will receive Wrong Answer; it means that you asked more queries than allowed, or asked an invalid query. If you ignore this, you can get other verdicts since your program will continue to read from a closed stream.

After printing a query do not forget to print end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see documentation for other languages.



When you know the answer, you need to print it.

The format of the answer depends on whether the graph is bipartite or not.

If the graph is bipartite, print two lines. The first should contain the letter "Y" (short for "YES") followed by a space, and then a single integer s (0 ≤ s ≤ n) — the number of vertices in one of the partitions. Second line should contain s integers a_1, a_2, ..., a_s — vertices belonging to the first partition. All a_i must be distinct, and all edges in the main graph must have exactly one endpoint in the set \\{a_i\}.

If the graph is not bipartite, print two lines. The first should contain the letter "N" (short for "NO") followed by a space, and then a single integer l (3 ≤ l ≤ n) — the length of one simple cycle of odd length. Second line should contain l integers c_1, c_2, ..., c_l — the vertices along the cycle. It must hold that for all 1 ≤ i ≤ l, there is an edge \\{c_i, c_{(i mod l)+1}\} in the main graph, and all c_i are distinct.

If there are multiple possible answers, you may print any of them.

Hacks format For hacks, use the following format:

The first line contains two integers n and m~(1 ≤ n ≤ 600, 0 ≤ m ≤ (n(n-1))/(2)) — the number of vertices and edges of the graph, respectively.

Each of the next m lines contains two integers u_i and v_i~(1 ≤ u_i, v_i ≤ n) mean that there is an edge between u_i and v_i. There must not be any multiple edges, no loops, and the graph must be connected.

For example, you need to use this test to get the first sample:
    
    
      
    4 4  
    4 1  
    1 3  
    3 2  
    2 4  
    

Examples

Input

4
4
0
1
1
1
0

Output

? 4 
1 2 3 4
? 2
1 2
? 2
1 3
? 2
1 4
? 2
2 4
? 2
3 4
Y 2
1 2

Input

4
4
3

Output

? 4
1 4 2 3
? 3
1 2 4
N 3
2 1 4

Note

In the first case, Alice learns that there are 4 edges in the whole graph. Over the course of the next three queries, she learns that vertex 1 has two neighbors: 3 and 4. She then learns that while vertex 2 is adjacent to 4, the vertex 3 isn't adjacent to 4. There is only one option for the remaining edge, and that is (2, 3). This means that the graph is a cycle on four vertices, with (1, 2) being one partition and (3, 4) being the second. Here, it would be also valid to output "3 4" on the second line.

In the second case, we also have a graph on four vertices and four edges. In the second query, Alice learns that there are three edges among vertices (1, 2, 4). The only way this could possibly happen is that those form a triangle. As the triangle is not bipartite, Alice can report it as a proof. Notice that she does not learn where the fourth edge is, but she is able to answer Bob correctly anyway.

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.Set;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.HashMap;
import java.util.TreeSet;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.AbstractCollection;
import java.util.Map;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.ArrayDeque;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author prakharjain
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        _1033E solver = new _1033E();
        solver.solve(1, in, out);
        out.close();
    }

    static class _1033E {
        List[] g;
        Map<Set<Integer>, Integer> cache = new HashMap<>();

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();

            g = new List[n];

            DsuInteger dsu = new DsuInteger(n);

            for (int i = 0; i < n; i++) {
                g[i] = new ArrayList();
                dsu.createSet(i);
            }

            for (int i = 0; i < n - 1; i++) {
                int minSize = n;
                int vertex = -1;
                for (int j = 0; j < n; j++) {
                    int fs = dsu.findSet(j);
                    if (dsu.size[fs] < minSize) {
                        minSize = dsu.size[fs];
                        vertex = j;
                    }
                }

                int vertexFs = dsu.findSet(vertex);

                Set<Integer> s1 = new HashSet<>();
                Set<Integer> s2 = new HashSet<>();
                for (int j = 0; j < n; j++) {
                    if (dsu.findSet(j) == vertexFs) {
                        s2.add(j);
                    } else {
                        s1.add(j);
                    }
                }

                edge edge = searchEdge(s1, s2, in, out);

                g[edge.u].add(edge.v);
                g[edge.v].add(edge.u);

                dsu.mergeSets(edge.u, edge.v);
            }

            IsBipartite isb = new IsBipartite(g);

            isb.assign2Colors(0);

            HashSet<Integer> partition1 = isb.zeroNodes;
            HashSet<Integer> partition2 = isb.oneNodes;

//        if (isb.zeroColorNodes > isb.oneColorNodes) {
//            partition = isb.oneNodes;
//        } else {
//            partition = isb.zeroNodes;
//        }

            int part1Edges = numOfEdges(partition1, in, out);
            int part2Edges = numOfEdges(partition2, in, out);

            if (part1Edges == 0 && part2Edges == 0) {
                System.out.println("Y " + partition1.size());
                for (int v : partition1) {
                    System.out.print((v + 1) + " ");
                }
                System.out.println();
                System.out.flush();
            } else if (part1Edges == 0) {
                TreeSet<Integer> ts1 = new TreeSet<>(partition2);
                TreeSet<Integer> ts2 = new TreeSet<>();

                while (true) {
                    int last = ts1.last();
                    ts1.remove(last);
                    ts2.add(last);
                    edge edge = searchEdge(ts1, ts2, in, out);

                    if (edge != null) {
                        g[edge.u].add(edge.v);
                        g[edge.v].add(edge.u);

                        IsBipartite isb2 = new IsBipartite(g);
                        isb2.isBipartite(0);

                        System.out.println("N " + isb2.nonBipartiteCycle.size());
                        for (int v : isb2.nonBipartiteCycle) {
                            System.out.print((v + 1) + " ");
                        }
                        System.out.println();
                        System.out.flush();
                        break;
                    }
                }
            } else if (part2Edges == 0) {
                TreeSet<Integer> ts1 = new TreeSet<>(partition1);
                TreeSet<Integer> ts2 = new TreeSet<>();

                while (true) {
                    int last = ts1.last();
                    ts1.remove(last);
                    ts2.add(last);
                    edge edge = searchEdge(ts1, ts2, in, out);

                    if (edge != null) {
                        g[edge.u].add(edge.v);
                        g[edge.v].add(edge.u);

                        IsBipartite isb2 = new IsBipartite(g);
                        isb2.isBipartite(0);

                        System.out.println("N " + isb2.nonBipartiteCycle.size());
                        for (int v : isb2.nonBipartiteCycle) {
                            System.out.print((v + 1) + " ");
                        }
                        System.out.println();
                        System.out.flush();
                        break;
                    }
                }
            }

        }

        edge searchEdge(Set<Integer> s1, Set<Integer> s2, InputReader in, OutputWriter out) {
            if (s1.size() < s2.size()) {
                Set<Integer> tem = s1;
                s1 = s2;
                s2 = tem;
            }

//        Set<Integer> s = new HashSet<>(s1);
//        s.addAll(s2);
//
//        int total = numOfEdges(s, in, out);

            while (true) {
                if (s1.size() == 1 && s2.size() == 1) {
                    HashSet<Integer> s1s2 = new HashSet<>(s1);
                    s1s2.addAll(s2);
                    int s1s2Edges = numOfEdges(s1s2, in, out);
                    if (s1s2Edges > 0) {
                        return new edge(s1.iterator().next(), s2.iterator().next());
                    } else {
                        break;
                    }
                }

                if (s1.size() < s2.size()) {
                    Set<Integer> tem = s1;
                    s1 = s2;
                    s2 = tem;
                }

                int s1Size = s1.size();
                Set<Integer> s3 = new HashSet<>();
                Set<Integer> s4 = new HashSet<>();
                int s3Size = s1Size / 2;
                int i = 0;
                for (int v : s1) {
                    if (i < s3Size) {
                        s3.add(v);
                    } else {
                        s4.add(v);
                    }
                    i++;
                }

                int s3Edges = numOfEdges(s3, in, out);
                int s2Edges = numOfEdges(s2, in, out);

                HashSet<Integer> s3s2 = new HashSet<>(s3);
                s3s2.addAll(s2);

                int s3s2Edges = numOfEdges(s3s2, in, out);

                if (s3s2Edges > s3Edges + s2Edges) {
                    s1 = s3;
                } else {
                    s1 = s4;
                }
            }

            return null;
        }

        int numOfEdges(Set<Integer> s, InputReader in, OutputWriter out) {
            if (s.size() <= 1) {
                return 0;
            }

            if (s.size() <= 10) {
                if (cache.containsKey(s)) {
                    return cache.get(s);
                }
            }
            System.out.println("? " + s.size());
            for (int num : s) {
                System.out.print((num + 1) + " ");
            }
            System.out.println();
            System.out.flush();

            int edges = in.nextInt();

            if (s.size() <= 10) {
                Set<Integer> newSet = Collections.unmodifiableSet(new HashSet<>(s));
                cache.put(newSet, edges);
            }

            return edges;
        }

        class edge {
            int u;
            int v;

            public edge(int u, int v) {
                this.u = u;
                this.v = v;
            }

        }

        class DsuInteger {
            int[] parent;
            int[] rank;
            int[] size;
            int n;

            public DsuInteger(int n) {
                this.n = n;
                this.parent = new int[n];
                this.rank = new int[n];
                this.size = new int[n];
            }

            int createSet(int x) {
                parent[x] = x;
                rank[x] = 0;
                size[x] = 1;
                return x;
            }

            int findSet(int x) {
                int par = parent[x];
                if (x != par) {
                    parent[x] = findSet(par);
                    return parent[x];
                }
                return par;
            }

            int mergeSets(int x, int y) {
                int rx = findSet(x);
                int ry = findSet(y);

                if (rx == ry) {
                    return rx;
                }

                int fp = -1;

                if (rank[rx] > rank[ry]) {
                    parent[ry] = rx;
                    fp = rx;
                } else {
                    parent[rx] = ry;
                    fp = ry;
                }

                size[fp] = size[rx] + size[ry];

                if (rank[rx] == rank[ry]) {
                    rank[ry] = rank[ry] + 1;
                }

                return fp;
            }

        }

        class IsBipartite {
            List[] g;
            int n;
            boolean[] vis;
            boolean[] colorVis;
            int[] level;
            int[] color;
            int[] parent;
            int zeroColorNodes = 0;
            int oneColorNodes = 0;
            List<Integer> nonBipartiteCycle = new ArrayList<>();
            HashSet<Integer> zeroNodes = new HashSet<>();
            HashSet<Integer> oneNodes = new HashSet<>();

            public IsBipartite(List[] g) {
                this.g = g;
                this.n = g.length;
                this.vis = new boolean[n];
                this.level = new int[n];
                this.color = new int[n];
                this.colorVis = new boolean[n];
                this.parent = new int[n];
            }

            boolean isBipartite(int u) {
                ArrayDeque<Integer> queue = new ArrayDeque<>();

                queue.addLast(u);
                vis[u] = true;
                level[u] = 0;
                parent[u] = -1;

                while (queue.size() > 0) {
                    int front = queue.removeFirst();

                    for (int v : (List<Integer>) g[front]) {
                        if (vis[v]) {
                            if (level[v] == level[front]) {
                                findCycle(v, front);
                                return false;
                            }
                        } else {
                            queue.addLast(v);
                            vis[v] = true;
                            level[v] = level[front] + 1;
                            parent[v] = front;
                        }
                    }
                }

                return true;
            }

            void findCycle(int u, int v) {
                List<Integer> secondPart = new ArrayList<>();

                while (u != v) {
                    nonBipartiteCycle.add(u);
                    secondPart.add(v);

                    u = parent[u];
                    v = parent[v];
                }

                nonBipartiteCycle.add(u);

                Collections.reverse(secondPart);

                nonBipartiteCycle.addAll(secondPart);
            }

            void assign2Colors(int u) {
                dfs(u, -1);
            }

            void dfs(int u, int prevColor) {
                if (prevColor == -1) {
                    color[u] = 0;
                } else {
                    color[u] = 1 - prevColor;
                }

                if (color[u] == 0) {
                    zeroColorNodes++;
                    zeroNodes.add(u);
                } else {
                    oneColorNodes++;
                    oneNodes.add(u);
                }

                colorVis[u] = true;

                for (int v : (List<Integer>) g[u]) {
                    if (!colorVis[v])
                        dfs(v, color[u]);
                }
            }

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}