#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void dec(unordered_map<long long, long long>& mp, long long key) {
  if (mp.count(key)) mp[key]--;
  if (mp[key] <= 0) mp.erase(key);
}
int main() {
  long long N;
  cin >> N;
  vector<long long> V(N);
  unordered_map<long long, long long> mp;
  for (auto&& e : V) {
    cin >> e;
    mp[e]++;
  }
  long long tp = V[0];
  dec(mp, tp);
  bool f = false;
  for (long long i = 1; i < N; ++i) {
    long long sec = V[i];
    unordered_map<long long, long long> MP = mp;
    dec(MP, sec);
    bool f1 = true;
    long long pre = sec, prepre = tp;
    for (long long j = 1; j < N - 1; ++j) {
      if (j == i) continue;
      long long nxt = pre ^ prepre;
      if (!MP.count(nxt)) {
        f1 = false;
        break;
      }
      dec(MP, nxt);
      prepre = pre;
      pre = nxt;
    }
    if (f1 == false) continue;
    if (MP.count(pre ^ tp)) {
      f = true;
      break;
    }
  }
  if (f)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
