#include <bits/stdc++.h>
using namespace std;
const uint64_t UnDefined = static_cast<uint64_t>(-1);
int main() {
  uint64_t N;
  cin >> N;
  multiset<uint64_t> Aset;
  for (uint64_t n = 0; n < N; ++n) {
    uint64_t A;
    cin >> A;
    Aset.insert(A);
  }
  uint64_t a0 = *Aset.begin();
  Aset.erase(Aset.begin());
  uint64_t a0_org = a0;
  uint64_t a1 = UnDefined;
  for (auto itr_a1 = Aset.begin(); itr_a1 != Aset.end(); ++itr_a1) {
    auto itr_a = Aset.find(a0 ^ *itr_a1);
    if (itr_a != Aset.end()) {
      a1 = *itr_a1;
      Aset.erase(itr_a1);
      break;
    }
  }
  if (a1 == UnDefined) {
    cout << "No" << endl;
    return 0;
  }
  uint64_t a2 = a0 ^ a1;
  while (!Aset.empty()) {
    auto itr = Aset.find(a2);
    if (itr == Aset.end()) {
      break;
    }
    a0 = a1;
    a1 = a2;
    a2 = a0 ^ a1;
    Aset.erase(itr);
  }
  if (Aset.size() > 0) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
  return 0;
}
