#include using namespace std; int main () { int N, X; cin >> N >> X; vector A(N); for (auto& a : A) { cin >> a; } sort(A.begin(), A.end(), [=](int a, int b) {return (a - (a&X)) < (b - (b&X));}); for (int i = 0; i < N - 1; i ++) { if ((A[i] >= (A[i + 1] ^ X)) || ((A[i] ^ X) >= A[i + 1])) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }