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.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
import java.util.LinkedList;

public class C {
	public static void main(String[] args) {
		FastScannerC sc = new FastScannerC(System.in);
		
		int N = sc.nextInt();
		int ON = N;
		int X = sc.nextInt();
		int zero = 131072;		//this is binary 100000000000000000

		if(N == 1){
			System.out.println("YES\n" + X);
			System.exit(0);
		}
		else if(N == 2){
			if(X == 0) System.out.println("NO");
			else System.out.println("YES\n0 " + X);
			System.exit(0);
		}
		else{
			LinkedList<Integer> list = new LinkedList<>();
			if(X == 0){
				//X == 0, pick N nums that XOR to 0
				int half = N / 2;
				if(N % 2 != 0){
					if(half % 2 == 0) list.add(0);
					else list.add(zero);
					N--;
					for(int i = 1; i <= half; i++){
						list.add(i);
						list.add(zero + i);
					}
				}
				else{
					if(half % 2 == 0){
						for(int i = 1; i <= half; i++){
							list.add(i);
							list.add(zero + i);
						}
					}
					else{
						int zero2 = 2*zero;
						list.add(1);
						list.add(2);
						list.add(3);
						list.add(1 + zero);
						list.add(2 + zero2);
						list.add(3 + zero + zero2);
						for(int i = 4; i <= half; i++){
							list.add(i);
							list.add(zero + i);
						}
					}
				}
			}
			else{
				//X > 0, pick X and N-1 nums that XOR to 0 
				if(N == 3){
					System.out.println("YES\n0 " + zero + " " + (zero + X));
					System.exit(0);
				}
				else{
					N--;
					list.add(X);
					
					int half = N / 2;
					if(N % 2 != 0){
						if(half % 2 == 0) list.add(0);
						else list.add(zero);
						N--;
						for(int i = 1; list.size() < ON; i++){
							if(i == X) continue;
							list.add(i);
							list.add(zero + i);
						}
					}
					else{
						if(half % 2 == 0){
							for(int i = 1; list.size() < ON; i++){
								if(i == X) continue;
								list.add(i);
								list.add(zero + i);
							}
						}
						else{
							int zero2 = 2*zero;
							int c = 1;
							if(c == X) c++;
							list.add(c);
							list.add(c + zero);
							c++;
							if(c == X) c++;
							list.add(c);
							list.add(c + zero2);
							c++;
							if(c == X) c++;
							list.add(c);
							list.add(c + zero + zero2);
							c++;
							for(int i = c; list.size() < ON; i++){
								if(i == X) continue;
								list.add(i);
								list.add(zero + i);
							}
						}
					}
				}
			}
			StringBuilder sb = new StringBuilder();
			for(int i : list){
				sb.append(i);
				sb.append(' ');
			}
			System.out.println("YES");
			System.out.println(sb.substring(0, sb.length() - 1));
			System.exit(0);
		}
	}
}

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

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

    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 String next()
    {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do
        {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }  

    public double nextDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.') {
            if (c == 'e' || c == 'E')
                return res * Math.pow(10, nextInt());
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.') {
            c = read();
            double m = 1;
            while (!isSpaceChar(c)) {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }
    
    public long nextLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long 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 c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }
    
    public boolean isLineEndChar(int c)
    {
        if (filter != null)
            return filter.isSpaceChar(c);
        return c == '\n' || c == '\r' || c == -1;
    }

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