#include <bits/stdc++.h>
void solve();
int main() {
  solve();
  return 0;
}
using namespace std;
int N;
vector<int> A;
void solve() {
  cin >> N;
  A.resize(N);
  for (int n = 0; n < N; n++) cin >> A[n];
  sort(A.begin(), A.end());
  vector<pair<int, int>> amap;
  amap.push_back(pair<int, int>(A[0], 1));
  for (int n = 1; n < N; n++) {
    if (A[n] != A[n - 1])
      amap.push_back(pair<int, int>(A[n], 1));
    else
      amap.back().second++;
  }
  int p = 0, p2 = 1;
  while (2 * p2 <= A[0]) {
    p++;
    p2 *= 2;
  }
  if (A[N - 1] >= p2 * 2) {
    cout << "No" << endl;
    return;
  }
  bool ansflag = false;
  for (int n1 = 1; n1 < N; n1++) {
    vector<int> X;
    X.resize(N);
    X[0] = A[0], X[1] = A[n1];
    vector<pair<int, int>> xmap(amap);
    bool flag = true;
    for (int n = 2; n < N; n++) {
      X[n] = X[n - 1] ^ X[n - 2];
      if (n >= 4) {
        if (X[n] != X[n - 2] ^ X[n - 4]) {
          flag = false;
          break;
        }
      }
      int s = -1, e = xmap.size();
      while (e - s > 1) {
        int m = (e + s) / 2;
        if (xmap[m].first <= X[n])
          s = m;
        else
          e = m;
      }
      if (s < 0) {
        flag = false;
        break;
      }
      if (xmap[s].first != X[n]) {
        flag = false;
        break;
      }
      if (xmap[s].second == 0) {
        flag = false;
        break;
      }
      xmap[s].second--;
    }
    if (!flag) continue;
    if (X[0] == X[N - 1] ^ X[N - 2]) {
      ansflag = true;
      break;
    }
  }
  if (ansflag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return;
}
