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.*;
import java.util.*;
import java.util.Map.Entry;
import java.lang.Math;
import java.math.BigInteger;

public class Problem {

	public static void main(String[] args) throws IOException {

		new Problem().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok;
	Random rnd = new Random();
	static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

	Problem() throws FileNotFoundException {

		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
		tok = new StringTokenizer("");
	}

	long INF = 1L * 1000 * 1000 * 1000 * 1000 * 100 + 100;

	int curDay = 0;

	class Exam implements Comparable<Exam> {
		int ind;
		int cost;

		Exam(int ind, int cost) {
			this.cost = cost;
			this.ind = ind;
		}

		@Override
		public int compareTo(Exam other) {
			return Integer.compare(this.cost + curDay - this.ind, other.cost
					+ curDay - other.ind)
					* (-1);
		}

	}

	List<Integer>[] graph;
	long color1 = 0;
	long color2 = 0;
	boolean used[];

	void solve() throws IOException {
		int n = rI();
		int x = rI();
		boolean[] isChange = new boolean[19];

		Set<Integer> ansSet = new HashSet<>();
		if (x == 0) {
			x = 2;
			if (n == 3) {
				out.println("YES");
				out.println(1 + " " + 2 + " " + 3);
				return;
			}
			if (n % 2 == 1) {
				ansSet.add(0);
				n -= 1;
			}
			if (n % 4 == 0) {
				x = 2;
			} else if (n == 2) {
				out.println("NO");
				return;
			} else {
				if (x > 3) {
					ansSet.add(1);
					ansSet.add(2);
					ansSet.add(3);
					ansSet.add(x);
				} else {
					ansSet.add(4);
					ansSet.add(8);
					ansSet.add(12);
					ansSet.add(x);
				}
				n -= 4;
			}
		} else {
			if(n==1){
				out.println("YES");
				out.print(x);
				return;
			}
			if (n % 2 == 1) {
				n -= 1;
				ansSet.add(0);
			}
			if (n % 4 == 0) {
				if (x > 3) {
					ansSet.add(1);
					ansSet.add(2);
					ansSet.add(3);
					ansSet.add(x);
				} else {
					ansSet.add(4);
					ansSet.add(8);
					ansSet.add(12);
					ansSet.add(x);
				}
				n -= 4;
			}
		}

		for (int i = 0; i < 19; ++i) {
			if (checkBit(x, i) == 1) {
				isChange[i] = true;
			}
		}
		for (int i = 1; i < 1000000 + 100; ++i) {
			//out.println(i);
			if (n == 0) {
				break;
			}
			if (ansSet.contains(i) || i == x) {
				continue;
			}
			int pair = 0;
			for (int bit = 0; bit < 19; ++bit) {
				if (isChange[bit]) {
					if (checkBit(i, bit) == 0) {
						pair += Math.pow(2, bit);
					}
				} else {
					if (checkBit(i, bit) == 1) {
						pair += Math.pow(2, bit);
					}
				}
			}
			if (pair == x || ansSet.contains(pair)) {
				continue;
			}
			//out.println(pair);
			ansSet.add(i);
			ansSet.add(pair);
			n -= 2;
		}

		out.println("YES");
		for (int i : ansSet) {
			out.print(i + " ");
		}

		int ans = -1;
		for (int i : ansSet) {
			if (ans == -1) {
				ans = i;
				continue;
			}
			ans ^= i;
		}
		//out.println(ans);
	}

	int checkBit(int mask, int bit) {
		return (mask >> bit) & 1;
	}

	// ======================================================

	// ======================================================
	void run() throws IOException {
		solve();
		out.close();
	}

	char[] reverseCharArray(char[] arr) {
		char[] ans = new char[arr.length];
		for (int i = 0; i < arr.length; ++i) {
			ans[i] = arr[arr.length - i - 1];
		}
		return ans;
	}

	int sqrt(double m) {
		int l = 0;
		int r = 1000000000 + 9;
		int i = 1000;
		while (r - l > 1) {
			int mid = (r + l) / 2;
			if (mid * mid > m) {
				r = mid;
			} else {
				l = mid;
			}
		}
		return l;
	}

	int countPow(int m, int n) {
		int ans = 0;
		while (m % n == 0 && m > 0) {
			ans++;
			m /= n;
		}
		return ans;
	}

	long binPow(long a, long b) {
		if (b == 0) {
			return 1;
		}
		if (b % 2 == 1) {
			return a * binPow(a, b - 1);
		} else {
			long c = binPow(a, b / 2);
			return c * c;
		}

	}

	long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a % b);
	}

	long pow(long x, long k) {
		long ans = 1;
		for (int i = 0; i < k; ++i) {
			ans *= x;
		}
		return ans;
	}

	// ////////////////////////////////////////////////////////////////////

	String delimiter = " ";

	String readLine() throws IOException {
		return in.readLine();
	}

	String rS() throws IOException {
		while (!tok.hasMoreTokens()) {
			String nextLine = readLine();
			if (null == nextLine)
				return null;

			tok = new StringTokenizer(nextLine);
		}

		return tok.nextToken(delimiter);
	}

	int rI() throws IOException {
		return Integer.parseInt(rS());
	}

	long rL() throws IOException {
		return Long.parseLong(rS());
	}

	int[] rA(int b) {
		int a[] = new int[b];
		for (int i = 0; i < b; i++) {
			try {
				a[i] = rI();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return a;
	}

	int[] readSortedIntArray(int size) throws IOException {
		Integer[] array = new Integer[size];

		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}

	int[] sortedIntArray(int size, int[] array) throws IOException {
		for (int index = 0; index < size; ++index) {
			array[index] = rI();
		}
		Arrays.sort(array);

		int[] sortedArray = new int[size];
		for (int index = 0; index < size; ++index) {
			sortedArray[index] = array[index];
		}

		return sortedArray;
	}
}