#include <bits/stdc++.h>
using namespace std;
uint64_t MOD = 1000000007;
string ans = "No";
vector<int> A;
void Dfs(set<int> S, int n, int m) {
  if (S.empty()) {
    if ((n ^ m) == A.front()) ans = "Yes";
  } else {
    if (S.count(n ^ m)) {
      S.erase(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);
  }
  set<int> setA;
  for (auto a : A) setA.insert(a);
  setA.erase(A.at(0));
  for (auto a : setA) {
    if (setA.count(A.at(0) ^ a)) {
      set<int> _S = setA;
      _S.erase(a);
      _S.erase(A.at(0) ^ a);
      Dfs(_S, a, A.at(0) ^ a);
    }
  }
  cout << ans << endl;
}
