#include <bits/stdc++.h>
using namespace std;
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using ll = long long;
using ul = unsigned long;
template <class T, class C>
void chmax(T& a, C b) {
  a > b ?: a = b;
}
template <class T, class C>
void chmin(T& a, C b) {
  a < b ?: a = b;
}
const int mod = 1e9 + 7;
int binary_search(VI& a, int key) {
  int left = 0, right = (int)a.size() - 1;
  while (right >= left) {
    int mid = left + (right - left) / 2;
    if (a[mid] == key)
      return mid;
    else if (a[mid] > key)
      right = mid - 1;
    else if (a[mid] < key)
      left = mid + 1;
  }
  return -1;
}
void printv(VI& v) {
  for (int i = (int)(0); i < (int)(v.size()); ++i) cout << v[i] << " ";
  cout << endl;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  VI v;
  for (int i = (int)(0); i < (int)(n); ++i) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  ;
  VI out;
  out.push_back(v[0]);
  v.erase(v.begin());
  int last = v.size() - 1;
  out.push_back(v[3]);
  v.erase(v.begin() + 3);
  string ans = "No";
  for (int i = 2; i < n; i++) {
    if (i == n - 1) {
      int x = out[0] ^ out[i - 1];
      if (v[0] == x) ans = "Yes";
      break;
    }
    int x = out[i - 2] ^ out[i - 1];
    int index = binary_search(v, x);
    if (index != -1) {
      out[i] = v[index];
      v.erase(v.begin() + index);
    } else {
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
