#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  bitset<100001> r;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    r[i] = 0;
  }
  function<bool(int, int, int, int, bitset<100001>)> search =
      [&](int f, int p, int pp, int nr, bitset<100001> r) {
        if (nr == 1) {
          int k;
          for (k = 0; k < N; k++) {
            if (r[k] == 0) break;
          }
          if ((a[k] ^ pp) == p && (f ^ p) == a[k]) {
            return true;
          } else {
            return false;
          }
        }
        for (int k = 0; k < N; k++) {
          if (r[k] == 1) continue;
          if (pp == -1 || (pp ^ a[k]) == p) {
            bitset<100001> rn(r);
            rn.set(k);
            return search(f, a[k], p, nr - 1, rn);
          }
        }
        return false;
      };
  r.set(0);
  if (search(a[0], a[0], -1, N - 1, r)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
