#include <bits/stdc++.h>
using namespace std;
vector<int> A;
vector<int> B;
vector<int> C;
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int tmp;
    cin >> tmp;
    A.emplace_back(tmp);
    B.emplace_back(tmp);
    C.emplace_back(0);
  }
  bool flg;
  for (int k = 1; k < N; ++k) {
    C[0] = A[0];
    C[1] = A[k];
    A[k] = -1;
    for (int ic = 2; ic < N; ++ic) {
      flg = false;
      for (int ia = 1; !flg && ia < N; ++ia) {
        if (A[ia] < 0) {
          continue;
        }
        if (C[ic - 1] == (C[ic - 2] ^ A[ia])) {
          C[ic] = A[ia];
          A[ia] = -1;
          flg = true;
        }
      }
      if (!flg) {
        break;
      }
    }
    if (flg) {
      if (C[N - 1] != (C[N - 2] ^ C[0])) {
        flg = false;
      }
    }
    if (flg) break;
    copy(B.begin(), B.end(), A.begin());
  }
  if (flg) {
    cout << "Yes" << endl;
    ;
  } else {
    cout << "No" << endl;
    ;
  }
  return 0;
}
