#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> v(n);
  map<int, int> freq;
  for (auto &x : v) {
    scanf("%d", &x);
    ++freq[x];
  }
  srand(time(0));
  random_shuffle(v.begin(), v.end());
  --freq[v[0]];
  clock_t T = clock();
  for (int i = 1; i < v.size() && int(clock() - T) <= 1.9 * CLOCKS_PER_SEC;
       ++i) {
    auto f = freq;
    int l = v[0] ^ v[1];
    int r = v[1];
    int pl = v[0], pr = v[0];
    bool bad = false;
    for (int j = 1; !bad && j < n; ++j) {
      if (j & 1) {
        if (--f[r] < 0) bad = true;
        r ^= pr;
        pr ^= r;
      } else {
        if (--f[l] < 0) bad = true;
        l ^= pl;
        pl ^= l;
      }
    }
    if (!bad && r == pl && l == pr) {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
  return 0;
}
