#include <bits/stdc++.h>
using namespace std;
bool ended = false;
void search(vector<long long>& vec, multiset<long long>& mus) {
  if (ended) return;
  if (mus.empty()) {
    if ((vec[1] ^ vec[vec.size() - 1]) == vec[0]) {
      cout << "Yes";
      ended = true;
    } else
      return;
  } else if (vec.size() >= 2) {
    for (long long l : mus) {
      if ((vec[vec.size() - 2] ^ l) == vec[vec.size() - 1]) {
        multiset<long long> nmus = mus;
        nmus.erase(l);
        vector<long long> nvec = vec;
        nvec.push_back(l);
        search(nvec, nmus);
      }
    }
  } else {
    for (long long l : mus) {
      multiset<long long> nmus = mus;
      nmus.erase(l);
      vector<long long> nvec = vec;
      nvec.push_back(l);
      search(nvec, nmus);
    }
  }
}
int main() {
  int n;
  cin >> n;
  multiset<long long> mus;
  for (int i = 0; i < n; ++i) {
    long long l;
    cin >> l;
    mus.insert(l);
  }
  vector<long long> vec;
  vec.push_back(*mus.begin());
  mus.erase(*mus.begin());
  search(vec, mus);
  if (!ended) {
    cout << "No" << endl;
  }
}
