#include <bits/stdc++.h>
void solve();
int main() {
  solve();
  return 0;
}
using namespace std;
int N;
vector<int> A;
void solve() {
  cin >> N;
  A.resize(N);
  for (int n = 0; n < N; n++) cin >> A[n];
  sort(A.begin(), A.end());
  bool flag = true;
  for (int n = 2; n < N; n++) {
    if (A[n] != ((A[n - 1]) ^ (A[n - 2]))) {
      flag = false;
      break;
    }
  }
  if (!flag || A[0] != ((A[N - 1]) ^ (A[N - 2])))
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return;
}
