#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> v(N);
  for (int i = 0; i < N; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  bool result = false;
  int i;
  for (i = 1; i < (N - 1); i++) {
    if ((v[i - 1] ^ v[i + 1]) != v[i]) {
      break;
    }
  }
  if (i == (N - 1) && (v[N - 1] ^ v[1]) == v[0] &&
      (v[N - 2] ^ v[0]) == v[N - 1]) {
    result = true;
  }
  cout << (result ? "Yes" : "No") << endl;
  return 0;
}
