#include <bits/stdc++.h>
using namespace std;
const int MD = 1e9 + 7;
void dbg() { cerr << "\n"; }
template <typename T, typename... T2>
void dbg(const T& fst, const T2&... rst) {
  cerr << fst << ": ";
  dbg(rst...);
}
bool f(vector<int>& b, map<int, int>& mp) {
  int n = (int)(b).size();
  for (int(i) = (2); (i) < (n); (i)++) {
    int w = b[i - 2] ^ b[i - 1];
    if (mp.count(w) && mp[w] > 0) {
      mp[w]--;
      b[i] = w;
    } else
      return false;
  }
  if ((b[n - 2] ^ b[0]) != b[n - 1]) return false;
  if ((b[n - 1] ^ b[1]) != b[0]) return false;
  return true;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int(i) = 0; (i) < (n); (i)++) cin >> a[i];
  sort((a).begin(), (a).end());
  map<int, int> mp;
  for (int(i) = (1); (i) < (n); (i)++) mp[a[i]]++;
  for (int(i) = (1); (i) < (n); (i)++) {
    vector<int> b(n, -1);
    b[0] = a[0];
    auto cmp = mp;
    b[1] = a[i];
    cmp[a[i]]--;
    bool kk = f(b, cmp);
    if (kk) {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
  return 0;
}
