#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using mint = modint998244353; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main() { int N,X; cin>>N>>X; vector<int> a(N); rep(i,N)cin>>a[i]; vector<pair<int,int>> t; rep(i,N){ int cur = 0; rep(j,30){ if((X>>j)&1){ } else{ cur |= a[i] & (1<<j); } } t.emplace_back(cur,a[i]); } sort(t.begin(),t.end()); rep(i,N)a[i] = t[i].second; rep(i,N-1){ if((a[i]^X)<(a[i+1])){ if((a[i])<(a[i+1]^X)){ continue; } } cout<<"No"<<endl; return 0; } cout<<"Yes"<<endl; return 0; }