/* -*- coding: utf-8 -*- * * 2024.cc: No.2024 Xer - yukicoder */ #include #include #include using namespace std; /* constant */ const int MAX_N = 200000; /* typedef */ typedef pair pii; /* global variables */ int as[MAX_N]; pii ps[MAX_N]; /* subroutines */ /* main */ int main() { int n, x; scanf("%d%d", &n, &x); for (int i = 0; i < n; i++) scanf("%d", as + i); for (int i = 0; i < n; i++) ps[i] = pii(min(as[i], as[i] ^ x), as[i]); sort(ps, ps + n); for (int i = 0; i + 1 < n; i++) { int a0 = ps[i].second, x0 = a0 ^ x; int a1 = ps[i + 1].second, x1 = a1 ^ x; if (! (a0 < x1 && x0 < a1)) { puts("No"); return 0; } } puts("Yes"); return 0; }