#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int a = 0; a < N; a++) {
    cin >> A[a];
  }
  sort(A.begin(), A.end());
  bool f = true;
  do {
    f = true;
    for (int a = 0; a < N; a++) {
      if ((A[(N + (a - 1)) % N] ^ A[(a + 1) % N]) != A[a]) {
        f = false;
      }
    }
    if (f) {
      break;
    }
  } while (next_permutation(A.begin(), A.end()));
  cout << (f ? "Yes" : "No") << endl;
}
