#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;
  while (next_permutation(v.begin(), v.end())) {
    int i;
    for (i = 0; i < N; i++) {
      int val1 = v[i == 0 ? (N - 1) : (i - 1)];
      int val2 = v[i == (N - 1) ? 0 : (i + 1)];
      if ((val1 ^ val2) != v[i]) {
        break;
      }
    }
    if (i == N) {
      result = true;
      break;
    }
  }
  cout << (result ? "Yes" : "No") << endl;
  return 0;
}
