#include <bits/stdc++.h>
using namespace std;
bool isXor(vector<int> A) {
  for (int i = 0; i < A.size(); i++) {
    if (A[(i + 1) % (A.size())] != (A[i] ^ A[(i + 2) % (A.size())])) {
      return false;
    }
  }
  return true;
}
int main(int argc, char* argv[]) {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  bool isRet = false;
  do {
    if (isXor(A)) {
      isRet = true;
      break;
    }
  } while (next_permutation(A.begin(), A.end()));
  cout << (isRet ? "Yes" : "No") << endl;
  return 0;
}
