Problem: Mahmoud and Ehab are on the third stage of their adventures now. As you know, Dr. Evil likes sets. This time he won't show them any set from his large collection, but will ask them to create a new set to replenish his beautiful collection of sets.

Dr. Evil has his favorite evil integer x. He asks Mahmoud and Ehab to find a set of n distinct non-negative integers such the bitwise-xor sum of the integers in it is exactly x. Dr. Evil doesn't like big numbers, so any number in the set shouldn't be greater than 106.

Input

The only line contains two integers n and x (1 ≤ n ≤ 105, 0 ≤ x ≤ 105) — the number of elements in the set and the desired bitwise-xor, respectively.

Output

If there is no such set, print "NO" (without quotes).

Otherwise, on the first line print "YES" (without quotes) and on the second line print n distinct integers, denoting the elements in the set is any order. If there are multiple solutions you can print any of them.

Examples

Input

5 5


Output

YES
1 2 4 5 7

Input

3 6


Output

YES
1 2 5

Note

You can read more about the bitwise-xor operation here: <https://en.wikipedia.org/wiki/Bitwise_operation#XOR>

For the first sample <image>.

For the second sample <image>.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class ProblemC3 {
    BufferedReader rd;

    ProblemC3() throws IOException {
        rd = new BufferedReader(new InputStreamReader(System.in));
        compute();
    }

    private void compute() throws IOException {
        int[] a = intarr();
        int n = a[0];
        int x = a[1];

        List<Integer> res = solve(n,x);

        if(res.isEmpty()) {
            out("NO");
        } else {
            out("YES");
            StringBuilder buf = new StringBuilder();
            for(Integer p: res) {
                if(buf.length() > 0) {
                    buf.append(' ');
                }
                buf.append(p);
            }
            out(buf);
        }
    }

    private List<Integer> solve(int n, int x) {
        int a17 = 1<<17;
        int a18 = 1<<18;
        List<Integer> res = new ArrayList<>();
        if(x==0) {
            if(n == 1) {
                res.add(0);
            } else if(n == 3) {
                res.add(1);
                res.add(2);
                res.add(3);
            } else if(n > 3) {
                int k = n % 4;
                if (k == 0) {
                    int base = 0;
                    while (n >= 4) {
                        res.add(a17 + base);
                        res.add(a18 + base);
                        res.add(a17 + base + 1);
                        res.add(a18 + base + 1);
                        base += 2;
                        n -= 4;
                    }
                } else {
                    int base = 0;
                    while (n > 8) {
                        res.add(a17 + base);
                        res.add(a18 + base);
                        res.add(a17 + base + 1);
                        res.add(a18 + base + 1);
                        base += 2;
                        n -= 4;
                    }
                    if (k == 1) {
                        res.add((1 << 19) + 15);
                        res.add((1 << 19) + 8);
                        res.add((1 << 19) + 4);
                        res.add((1 << 19) + (1 << 18) + (1 << 17) + 2);
                        res.add((1 << 18) + (1 << 17) + 1);
                    } else if(k == 2) {
                        res.add((1 << 19) + 31);
                        res.add((1 << 19) + 16);
                        res.add((1 << 19) + 8);
                        res.add((1 << 19) + 4);
                        res.add((1 << 19) + 2);
                        res.add((1 << 19) + 1);
                    } else if(k == 3) {
                        res.add((1 << 19) + 63);
                        res.add((1 << 19) + 32);
                        res.add((1 << 19) + 16);
                        res.add((1 << 19) + 8);
                        res.add((1 << 19) + 4);
                        res.add((1 << 19) + (1 << 18) + (1 << 17) + 2);
                        res.add((1 << 18) + (1 << 17) + 1);
                    }
                }
            }
            return res;
        }
        int base = 0;
        while(n > 4) {
            res.add(a17 + base);
            res.add(a18 + base);
            res.add(a17 + base + 1);
            res.add(a18 + base + 1);
            base += 2;
            n -= 4;
        }
        if(n == 4) {
            res.add((1<<19) + x);
            res.add((1<<19) + (1<<18) + (1<<17));
            res.add((1<<19) + (1<<17));
            res.add((1<<19) + (1<<18));
        } else if(n == 3) {
            res.add((1<<19) + x);
            res.add((1<<19) + (1<<18) + (1<<17));
            res.add((1<<18) + (1<<17));
        } else if(n == 2) {
            res.add((1<<19) + x);
            res.add((1<<19));
        } else {
            res.add(x);
        }
        return res;
    }

    private int[] intarr() throws IOException {
        return intarr(rd.readLine());
    }

    private int[] intarr(String s) {
        String[] q = split(s);
        int n = q.length;
        int[] a = new int[n];
        for(int i=0;i<n;i++) {
            a[i] = Integer.parseInt(q[i]);
        }
        return a;
    }

    private String[] split(String s) {
        if(s == null) {
            return new String[0];
        }
        int n = s.length();
        int start = -1;
        int end = 0;
        int sp = 0;
        boolean lastWhitespace = true;
        for(int i=0;i<n;i++) {
            char c = s.charAt(i);
            if(isWhitespace(c)) {
                lastWhitespace = true;
            } else {
                if(lastWhitespace) {
                    sp++;
                }
                if(start == -1) {
                    start = i;
                }
                end = i;
                lastWhitespace = false;
            }
        }
        if(start == -1) {
            return new String[0];
        }
        String[] res = new String[sp];
        int last = start;
        int x = 0;
        lastWhitespace = true;
        for(int i=start;i<=end;i++) {
            char c = s.charAt(i);
            boolean w = isWhitespace(c);
            if(w && !lastWhitespace) {
                res[x++] = s.substring(last,i);
            } else if(!w && lastWhitespace) {
                last = i;
            }
            lastWhitespace = w;
        }
        res[x] = s.substring(last,end+1);
        return res;
    }

    private boolean isWhitespace(char c) {
        return c==' ' || c=='\t';
    }

    private static void out(Object x) {
        System.out.println(x);
    }

    public static void main(String[] args) throws IOException {
        new ProblemC3();
    }
}