#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  set<long long> s((a).begin(), (a).end());
  long long tmp = a[0];
  long long c = 0;
  for (long long i = 1; i < a.size(); i++) {
    long long b = a[i];
    auto it = s.find(tmp ^ b);
    if (it != s.end()) {
      s.erase(tmp);
      s.erase(b);
      s.erase(tmp ^ b);
      c = tmp;
      tmp = b;
      break;
    }
  }
  if (s.size() == a.size()) {
    cout << "No" << endl;
    return 0;
  }
  while (!s.empty()) {
    auto it = s.find(tmp ^ c);
    if (it == s.end()) {
      cout << "No" << endl;
    } else {
      s.erase(*it);
      c = tmp;
      tmp = *it;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
