#include <bits/stdc++.h>
using namespace std;
using Int = long long unsigned;
Int const INF = 1e10;
void shuffle(Int ary[], int size) {
  for (int i = 0; i < size; i++) {
    int j = rand() % size;
    Int t = ary[i];
    ary[i] = ary[j];
    ary[j] = t;
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  Int p[n];
  for (int i = 0; i < n; i++) cin >> p[i];
  bool ans = true;
  shuffle(p, n);
  for (int i = 0; i < n - 2; i++) {
    Int *key = find(p + i + 2, p + n, p[i] ^ p[i + 1]);
    if (key == p + n) {
      ans = false;
      break;
    } else {
      swap(p[distance(p, key)], p[i + 2]);
    }
  }
  if (!(p[n - 2] ^ p[n - 1] == p[0] && p[n - 1] ^ p[0] == p[1])) ans = false;
  std::cout << (ans ? "Yes" : "No") << endl;
}
