#include <bits/stdc++.h>
using namespace std;
long long n, a[100000], hoge;
bool ans;
vector<long long> v;
map<long long, long long> m;
map<long long, bool> mm;
signed main() {
  cin >> n;
  for (long long i = 0; i < (long long)(n); ++i) cin >> a[i], m[a[i]]++;
  for (auto i : m) v.push_back(i.first);
  if (v[0] == 0 && v.size() == 1) {
    cout << "Yes" << endl;
    return 0;
  }
  if (v.size() < 3) {
    cout << "No" << endl;
    return 0;
  }
  hoge = v[0];
  for (long long i = 1; i < (long long)(v.size()); ++i) {
    if (mm[v[i]]) continue;
    auto M = m;
    long long tmp = hoge ^ v[i], z = n - 2, huga = v[i];
    while (M[tmp] > 0 && z) {
      M[tmp]--;
      long long hugatmp = tmp;
      tmp ^= huga;
      huga = hugatmp;
      --z;
    }
    mm[tmp] = true;
    if (!z) {
      ans = true;
      break;
    }
  }
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
