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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const double g = 10.0, eps = 1e-7;
const int N = 200000 + 10, maxn = 60000 + 10, inf = 0x3f3f3f;
bool vis[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, x;
  cin >> n >> x;
  if (n == 2 && x == 0) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  if (n == 6 && x == 0) {
    cout << "1 2 3 393216 131072 262144" << endl;
    return 0;
  }
  vector<int> v1, v2;
  for (int i = 1; i < (1 << 17); i++) {
    int s = 0;
    for (int j = 0; j < 17; j++) {
      if (i & (1 << j))
        ;
      else
        s += (1 << j);
    }
    if (!vis[i] && !vis[s]) {
      vis[s] = vis[i] = 1;
      v1.push_back(i);
      v2.push_back(s);
    }
  }
  memset(vis, 0, sizeof vis);
  set<int> ans;
  if (n % 4 == 1) {
    ans.insert(x);
    int k = 0;
    for (int i = 0; i < v1.size(); i++) {
      if (k >= (n - 1) / 2) break;
      if (v1[i] == x || v2[i] == x) continue;
      ans.insert(v1[i]);
      ans.insert(v2[i]);
      k++;
    }
  } else if (n % 4 == 2) {
    int a, b;
    for (int i = 0; i < 100; i++) {
      if ((x ^ i) != i) {
        ans.insert(x ^ i);
        ans.insert(i);
        a = x ^ i;
        b = i;
        break;
      }
    }
    int k = 0;
    for (int i = 0; i < v1.size(); i++) {
      if (k >= (n - 2) / 2) break;
      if (v1[i] == a || v2[i] == a || v1[i] == b || v2[i] == b) continue;
      ans.insert(v1[i]);
      ans.insert(v2[i]);
      k++;
    }
  } else if (n % 4 == 3) {
    int a, b, c;
    for (int i = 1; i < 100; i++) {
      for (int j = i + 1; j < 100; j++) {
        if ((x ^ i ^ j) != i && (x ^ i ^ j) != j) {
          ans.insert(x ^ i ^ j);
          ans.insert(i);
          ans.insert(j);
          a = x ^ i ^ j;
          b = i;
          c = j;
          break;
        }
      }
      if (ans.size() != 0) break;
    }
    int k = 0;
    for (int i = 0; i < v1.size(); i++) {
      if (k >= (n - 3) / 2) break;
      if (v1[i] == a || v2[i] == a || v1[i] == b || v2[i] == b || v1[i] == c ||
          v2[i] == c)
        continue;
      ans.insert(v1[i]);
      ans.insert(v2[i]);
      k++;
    }
  } else {
    int a, b, c, d;
    for (int i = 1; i < 100; i++) {
      for (int j = i + 1; j < 100; j++) {
        for (int k = j + 1; k < 100; k++) {
          if ((x ^ i ^ j ^ k) != i && (x ^ i ^ j ^ k) != j &&
              (x ^ i ^ j ^ k) != k) {
            ans.insert(x ^ i ^ j ^ k);
            ans.insert(i);
            ans.insert(j);
            ans.insert(k);
            a = x ^ i ^ j ^ k;
            b = i;
            c = j;
            d = k;
            break;
          }
        }
        if (ans.size() != 0) break;
      }
      if (ans.size() != 0) break;
    }
    int k = 0;
    for (int i = 0; i < v1.size(); i++) {
      if (k >= (n - 4) / 2) break;
      if (v1[i] == a || v2[i] == a || v1[i] == b || v2[i] == b || v1[i] == c ||
          v2[i] == c || v1[i] == d || v2[i] == d)
        continue;
      ans.insert(v1[i]);
      ans.insert(v2[i]);
      k++;
    }
  }
  for (auto x : ans) cout << x << " ";
  cout << endl;
  return 0;
}