#include <bits/stdc++.h>
using namespace std;
long long N;
vector<long long> vec;
void solve();
int main() {
  cin >> N;
  vec.resize(N);
  for (int i = 0; i < N; i++) {
    long long a;
    cin >> a;
    vec[i] = a;
  }
  solve();
}
void solve() {
  sort(vec.begin(), vec.end());
  bool found = false;
  do {
    bool xor_bool = false;
    for (long i = 0; i < N; i++) {
      long front_index = (i - 1 + N) % N;
      long back_index = (i + 1) % N;
      long long front = vec[front_index];
      long long back = vec[back_index];
      xor_bool = (front ^ back) == vec[i];
      if (xor_bool == false) {
        break;
      }
    }
    if (xor_bool) {
      found = true;
      break;
    }
  } while (next_permutation(vec.begin(), vec.end()));
  if (found) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
