#include <bits/stdc++.h>
using namespace std;
int n, a[100005], st, b, c, d, stk[100005], top;
map<int, int> mp;
int main() {
  scanf("%d%d", &n, &st);
  for (int i = 1, u; i < n; ++i) scanf("%d", a + i), ++mp[a[i]];
  for (int i = 1, flag; i < n; ++i) {
    b = st, c = a[i], flag = 1;
    for (int j = 1; j < n - 1; ++j) {
      if (mp[c ^ b])
        stk[++top] = c ^ b, --mp[c ^ b];
      else {
        flag = 0;
        while (top) ++mp[stk[top--]];
        break;
      }
    }
    if (flag == 1) {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
}
