#include <bits/stdc++.h>
using namespace std;
static_assert(sizeof(long) == 8, "long must be 64bit.");
int main() {
  int N;
  cin >> N;
  vector<long> A(N);
  for (long& a : A) cin >> a;
  set<long> checked;
  for (int i = 1; i < N; ++i) {
    long a = A[0];
    long b = A[i];
    if (checked.find(b) != checked.end()) continue;
    checked.insert(b);
    multiset<long> s(A.begin(), A.end());
    s.erase(s.find(a));
    s.erase(s.find(b));
    for (int j = 2; j < N; ++j) {
      long c = a ^ b;
      auto it = s.find(c);
      if (it == s.end()) break;
      s.erase(it);
      a = b;
      b = c;
    }
    if (s.empty() && (a ^ b) == A[0]) {
      cout << "Yes\n";
      return 0;
    }
  }
  cout << "No\n";
  return 0;
}
