#include <bits/stdc++.h>
using namespace std;
vector<unsigned int> a;
int find(unsigned int x, const vector<bool>& used) {
  auto it = lower_bound(a.begin(), a.end(), x);
  while (it != a.end() && *it == x) {
    int i = distance(a.begin(), it);
    if (!used[i]) return i;
    ++it;
  };
  return -1;
}
int main() {
  int N;
  cin >> N;
  a.resize(N);
  for (auto& ai : a) {
    cin >> ai;
  }
  sort(a.begin(), a.end());
  vector<bool> used(N);
  for (int i = 0; i < N - 1; ++i) {
    for (int j = i + 1; j < N; ++j) {
      for (size_t ii = 0; ii < used.size(); ++ii) {
        used[ii] = false;
      }
      used[i] = true;
      used[j] = true;
      int k = find(a[i] ^ a[j], used);
      if (k != -1) {
        used[k] = true;
        unsigned int c[2] = {a[k], a[j]};
        int q;
        for (q = 3; q < N; ++q) {
          unsigned int c2 = c[0] ^ c[1];
          int r = find(c2, used);
          if (r == -1) break;
          used[r] = true;
          c[0] = c[1];
          c[1] = c2;
        }
        if (q == N && (c[0] ^ a[i]) == c[1]) {
          puts("Yes");
          return 0;
        }
      }
    }
  }
  puts("No");
  return 0;
}
