#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  vector<long long> a;
  for (int i = 0; i < N; i++) {
    long long tmp;
    cin >> tmp;
    a.push_back(tmp);
  }
  sort(a.begin(), a.end());
  bool ret = true;
  do {
    for (int i = 1; i < N - 1; i++) {
      ret = true;
      if (a[i] != (long long)a[i - 1] ^ a[i + 1]) {
        ret = false;
        break;
      }
    }
    if (!ret) continue;
    if (ret) break;
  } while (next_permutation(a.begin(), a.end()));
  if (ret)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
