#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, X;
  cin >> N >> X;
  vector<int> A(N);
  for (int i = 0; i < N; i++){
    cin >> A[i];
  }
  function<bool(int, int)> comp = [&](int x, int y){
    if (x < (y ^ X) && (x ^ X) < y){
      return true;
    } else if (y < (x ^ X) && (y ^ X) < x){
      return false;
    } else {
      return x < y;
    }
  };
  sort(A.begin(), A.end(), comp);
  bool ok = true;
  for (int i = 0; i < N - 1; i++){
    if (A[i] >= (A[i + 1] ^ X) || (A[i] ^ X) >= A[i + 1]){
      ok = false;
    }
  }
  if (ok){
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}