#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long N;
  cin >> N;
  long long tab[N];
  for (long long i = 0; i < N; i++) {
    cin >> tab[i];
  }
  sort(tab, tab + N);
  bool ok = true;
  for (long long i = 0; i < N; i++) {
    if ((tab[(N + i - 1) % N] ^ tab[(i + 1) % N]) != tab[i]) {
      ok = false;
    }
  }
  if (ok)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
