#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> r;
int rg(int idx) { return r[idx % N]; }
void rs(int idx, int value) { r[idx % N] = value; }
int main() {
  cin >> N;
  vector<int> a(N);
  r = vector<int>(N, -1);
  for (int i = 0; i < N; ++i) {
    int in;
    cin >> in;
    a[i] = in;
  }
  sort(a.begin(), a.end());
  int k = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = i; j < N; ++j) {
      int rk = (rg(k) == -1) ? a[i] : rg(k);
      int rk1 = (rg(k + 1) == -1) ? a[j] : rg(k + 1);
      int rk2 = rk ^ rk1;
      if (binary_search(a.begin(), a.end(), rk2)) {
        rs(k, rk);
        rs(k + 1, rk1);
        rs(k + 2, rk2);
        ++k;
        if (k >= N) goto end;
      }
    }
  }
end:;
  if (find(r.begin(), r.end(), -1) == r.end()) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
