#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> r;
int left(int idx) {
  if (idx == 0)
    return r[N];
  else
    return r[idx - 1];
}
int right(int idx) {
  if (idx == N)
    return r[0];
  else
    return r[idx + 1];
}
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 = (r[k] == -1) ? a[i] : r[k];
      int rk1 = (r[k + 1] == -1) ? a[j] : r[k + 1];
      int rk2 = rk ^ rk1;
      if (binary_search(a.begin(), a.end(), rk2)) {
        r[k] = rk;
        r[k + 1] = rk1;
        r[k + 2] = rk2;
        ++k;
        if (k + 1 >= N) goto end;
      }
    }
  }
end:;
  if (find(r.begin(), r.end(), -1) == r.end()) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
