#include <bits/stdc++.h>
using namespace std;
int n;
bool is_ok(vector<long long> &a, map<long long, int> mp) {
  vector<long long> v;
  int ind = random() % n;
  v.push_back(a[ind]);
  mp[a[ind]]--;
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    if (i == ind) continue;
    if (mp[a[i]] <= 0) {
      continue;
    }
    mp[a[i]]--;
    v.push_back(a[i]);
    long long b = (a[ind] ^ a[i]);
    if (mp[b] <= 0) {
      break;
    }
    mp[b]--;
    v.insert(v.begin(), b);
  }
  if (v.size() != n) {
    return false;
  }
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    if (v[i] != (v[(i - 1 + n) % n] ^ v[(i + 1) % n])) {
      return false;
    }
  }
  return true;
}
int main(int argc, char const *argv[]) {
  cin >> n;
  vector<long long> a(n, 0);
  map<long long, int> mp;
  for (long long i = (long long)(0); i < (long long)(n); ++i) {
    cin >> a[i];
    mp[a[i]]++;
  }
  for (long long i = (long long)(0); i < (long long)(10); ++i) {
    if (is_ok(a, mp)) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
