#include <bits/stdc++.h>
using namespace std;
long long int return_xor_c(long long int a, long long int b) {
  long long int xor_a_b = a ^ b;
  return xor_a_b;
}
void vector_remove(vector<long long int>& vec, long int index) {
  vec.erase(vec.begin() + index);
}
int vector_finder(vector<long long int> vec, long long int number) {
  auto itr = std::find(vec.begin(), vec.end(), number);
  size_t index = distance(vec.begin(), itr);
  if (itr != vec.end()) {
    return index;
  } else {
    return -1;
  }
}
int main() {
  vector<long long int> num_vec;
  long int N, index;
  long long int num;
  long long int a, b, c, first_num;
  cin >> N;
  for (long int i = 0; i < N; i++) {
    cin >> num;
    num_vec.push_back(num);
  }
  first_num = num_vec[0];
  a = num_vec[0];
  b = num_vec[1];
  vector_remove(num_vec, 0);
  vector_remove(num_vec, 0);
  while (1) {
    c = return_xor_c(a, b);
    index = vector_finder(num_vec, c);
    if (index == -1) {
      cout << "No" << endl;
      break;
    } else {
      vector_remove(num_vec, index);
      a = b;
      b = c;
    }
    if (num_vec.size() == 0) {
      if (return_xor_c(a, b) == first_num) {
        cout << "Yes" << endl;
        break;
      } else {
        cout << "No" << endl;
        break;
      }
    }
  }
  return 0;
}
