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