#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;
  if (v.size() == 1) {
    result = (v[0] ^ v[0]) == v[0];
  } else {
    while (next_permutation(v.begin() + 1, v.end())) {
      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;
        break;
      }
    }
  }
  cout << (result ? "Yes" : "No") << endl;
  return 0;
}
