#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];
  set<int> aset;
  for (int n = 0; n < N; n++) aset.insert(A[n]);
  bool ansflag = false;
  for (int n1 = 1; n1 < N; n1++) {
    vector<int> X;
    X.resize(N);
    X[0] = A[0], X[1] = A[n1];
    set<int> xset;
    xset.insert(A[0]);
    xset.insert(A[n1]);
    bool flag = true;
    for (int n = 2; n < N; n++) {
      X[n] = X[n - 1] ^ X[n - 2];
      if (aset.find(X[n]) != aset.end() && xset.find(X[n]) == xset.end())
        xset.insert(X[n]);
      else {
        flag = false;
        break;
      }
    }
    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;
}
