#include <bits/stdc++.h>
using namespace std;
const long long maxn = 4 * 1e3 + 10;
const int inf = (1953125 << 9);
bool vis[maxn];
deque<long long> a, res;
void del(pair<long long, long long> x) {
  a.erase(a.begin() + binary_search(a.begin(), a.end(), x.first));
  a.erase(a.begin() + binary_search(a.begin(), a.end(), x.second));
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  memset(vis, false, sizeof vis);
  int n;
  cin >> n;
  a.resize(n);
  map<long long, int> mp;
  for (auto &it : a) {
    cin >> it;
    mp[it]++;
  }
  sort(a.begin(), a.end());
  res.push_back(a.front());
  a.pop_front();
  while (a.size()) {
    bool f = true;
    for (int i = 0; i < a.size(); ++i) {
      int xorr = res.back() ^ a[i];
      if (mp[xorr] > 0) {
        mp[xorr]--;
        mp[a[i]]--;
        f = false;
        res.push_back(xorr);
        res.push_back(a[i]);
        del({a[i], xorr});
        i = -1;
      }
    }
    if (f) {
      return cout << "No", 0;
    }
  }
  if ((res.front() ^ res[res.size() - 2]) != res.back() ||
      (res[1] ^ res.back()) != res.front()) {
    return cout << "No", 0;
  }
  cout << "Yes";
}
