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.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;
	
		 
		public class Solution123 implements Runnable
		{
			static final int MAX = 1000000007;
			static class InputReader
			{
				private InputStream stream;
				private byte[] buf = new byte[1024];
				private int curChar;
				private int numChars;
				private SpaceCharFilter filter;
				private BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		
				public InputReader(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 String nextLine()
				{
					String str = "";
		            try
		            {
		                str = br.readLine();
		            }
		            catch (IOException e)
		            {
		                e.printStackTrace();
		            }
		            return str;
				}
				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 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 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 String readString() 
				{
					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 boolean isSpaceChar(int c) 
				{
					if (filter != null)
						return filter.isSpaceChar(c);
					return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
				}
			 
				public String next() 
				{
					return readString();
				}
				
				public interface SpaceCharFilter 
				{
					public boolean isSpaceChar(int ch);
				}
			}
		 	
			public static void main(String args[]) throws Exception
			{
				new Thread(null, new Solution123(),"Solution123",1<<26).start();
			}	
			static long[] ans = new long[1000001];
			static int[] temp;
			static long[][] count = new long[1000001][9];
			static int[] freq;
			static HashSet<Integer> pw2 = new HashSet();
			static ArrayList<Integer> ar[] = new ArrayList[9];
			public void run()

			{
				InputReader sc= new InputReader(System.in);
				PrintWriter w= new PrintWriter(System.out);
				int n = sc.nextInt();
				int m = sc.nextInt();
				int samp = (int)Math.pow(2, 18);
				int samp2 = (int)Math.pow(2, 17);
				if(n == 1){
					w.println("YES");
					w.println(m);
				}else if(n == 2 && m == 0){
					w.println("NO");
				}else if(n == 2){
					w.println("YES");
					w.print((m-1) + " ");
					w.print((m-1)^m);
				}else{
					w.println("YES");
					if(n == 3 && m != 0){
						w.print("0" + " ");
						w.print(samp + " ");
						w.print(m ^ samp);
					}else if(n == 3 && m == 0){
						w.print("7 ");
						w.print("2 ");
						w.print("5 ");
					}
					else{
						int xor = 0;
						for(int i = 1;i <= n-3;i++){
							w.print(i + " ");
							xor = xor^i;
						}
						if(xor != m){
							w.print(0 + " ");
							int num1 = samp;
							w.print(num1 + " ");
							w.print((m ^ xor ^ num1) + " ");
						}else{
							{
								w.print(samp + " ");
								w.print(samp2 + " ");
								w.print((samp ^ samp2) + " ");
							}
						}
					}
				}
				w.close();
			}
			static class Pair{
				int a;
				int b;
				int c;
				Pair(int a,int b,int c){
					this.a = a;
					this.b = b;
					this.c = c;
				}
			}
		}