#include <bits/stdc++.h>
using namespace std;
uint64_t MOD = 1000000007;
string ans = "No";
vector<int> A;
void Dfs(multiset<int> S, int n, int m) {
  if (S.empty()) {
    if ((n ^ m) == A.front()) ans = "Yes";
  } else {
    if (S.find(n ^ m) != S.end()) {
      S.erase(S.find(n ^ m));
      Dfs(S, m, n ^ m);
    }
  }
}
int main() {
  int N;
  cin >> N;
  for (int n = 0; n < N; n++) {
    int a;
    cin >> a;
    A.push_back(a);
  }
  multiset<int> setA;
  for (auto a : A) setA.insert(a);
  setA.erase(setA.begin());
  for (auto itr = setA.begin(); itr != setA.end(); itr++) {
    auto goodItr = setA.find(A.at(0) ^ (*itr));
    if (goodItr != setA.end()) {
      multiset<int> _S = setA;
      _S.erase(_S.find(*itr));
      _S.erase(*goodItr);
      Dfs(_S, *itr, A.at(0) ^ (*itr));
    }
  }
  cout << ans << endl;
}
