#include <bits/stdc++.h>
using namespace std;
bool isOK(int n, map<uint, int> m, uint x, uint y) {
  uint v = x, w = y;
  m[x]--;
  m[y]--;
  for (uint i = 0; i < n - 2; i++) {
    uint z = x ^ y;
    if (m[z])
      m[z]--;
    else
      return false;
    x = y;
    y = z;
  }
  if (x ^ y == v || x ^ y == w)
    return true;
  else
    return false;
}
int main(void) {
  int N;
  cin >> N;
  vector<uint> a(N);
  map<uint, int> m1;
  map<uint, bool> m2;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    m1[a[i]]++;
  }
  for (uint i = 1; i < a.size(); i++) {
    if (!m2[a[i]] && isOK(N, m1, a[0], a[i])) {
      cout << "Yes" << endl;
      return 0;
    }
    m2[a[i]] = true;
  }
  cout << "No" << endl;
}
