#include <bits/stdc++.h>
using namespace std;
int calc_digit(long long n) {
  int digit = 0;
  while ((n >> digit) > 0) {
    digit++;
  }
  return digit;
}
int main() {
  int N;
  cin >> N;
  long long first;
  cin >> first;
  map<long long, int> m;
  long long a;
  for (int i = 0; i < N - 1; i++) {
    cin >> a;
    m[a]++;
  }
  for (auto itr = m.begin(); itr != m.end(); itr++) {
    map<long long, int> copy(m);
    long long current = first;
    long long next = itr->first;
    long long next_next = current ^ next;
    long long count = 0;
    copy[next]--;
    while (copy[next_next] > 0) {
      copy[next_next]--;
      current = next;
      next = next_next;
      next_next = current ^ next;
      count++;
    }
    if (count != N - 2) {
      continue;
    }
    if (next_next == first && (next ^ next_next) == itr->first) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
