#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0, i_len = (n); i < i_len; ++i) cin >> a[i];
  bool ans = false;
  sort(a.begin(), a.end());
  multiset<long long> setA;
  for (int i = 1; i < n; i++) setA.insert(a[i]);
  vector<long long> r(n + 1);
  r[0] = a[0];
  r[n] = a[0];
  for (int i = 1; i < n; i++) {
    setA.erase(setA.find(a[i]));
    long long want = r[0] ^ a[i];
    auto it = setA.find(want);
    if (it != setA.end()) {
      setA.erase(it);
      r[1] = want;
      r[2] = a[i];
      ans = true;
      break;
    }
    setA.insert(a[i]);
  }
  if (ans) {
    for (int i = 3; i < n; i++) {
      long long want = r[i - 2] ^ r[i - 1];
      auto it = setA.find(want);
      if (it != setA.end()) {
        setA.erase(it);
        r[i] = want;
      } else {
        ans = false;
        break;
      }
    }
  }
  auto o = ans ? "Yes" : "No";
  cout << o << endl;
}
