#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++) {
    vector<long long> dels;
    r[1] = a[i];
    dels.push_back(a[i]);
    setA.erase(setA.find(a[i]));
    ans = true;
    for (int i = 2; i < n; i++) {
      long long want = r[i - 2] ^ r[i - 1];
      auto it = setA.find(want);
      if (it != setA.end()) {
        dels.push_back(want);
        setA.erase(it);
        r[i] = want;
      } else {
        ans = false;
        break;
      }
    }
    if (ans) break;
    for (int i = 0, i_len = (dels.size()); i < i_len; ++i) setA.insert(dels[i]);
  }
  auto o = ans ? "Yes" : "No";
  cout << o << endl;
}
