#include <bits/stdc++.h>
using namespace std;
int main() {
  size_t N;
  cin >> N;
  vector<size_t> A;
  for (size_t i = 0; i < N; i++) {
    size_t a;
    cin >> a;
    A.emplace_back(a);
  }
  size_t p = 0;
  vector<size_t> results;
  for (size_t i = 0; i < N - 1; i++) {
    for (size_t j = i + i; j < N; j++) {
      if (A[p] == A[i] ^ A[j]) {
        results.emplace_back(A[p]);
        p = i;
      }
    }
  }
  if (results.size() == N) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
