#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  std::vector<int> camel(N);
  for (int i = 0; i < N; i++) {
    cin >> camel.at(i);
  }
  int done_flag = 0;
  int standard_num, tofind;
  standard_num = camel.at(0);
  for (int i = 1; i < N; i++) {
    if (done_flag & (1 << i)) {
      continue;
    }
    if (camel.at(i) == standard_num && N % 2 == 0) {
      done_flag |= (1 << i);
      continue;
    }
    if (i == N - 1) {
      cout << "No" << endl;
      return 0;
    }
    tofind = standard_num ^ camel.at(i);
    for (int j = i + 1; j < N; j++) {
      if (done_flag & (1 << j)) {
        continue;
      }
      if (camel.at(j) == tofind) {
        done_flag |= (1 << i);
        done_flag |= (1 << j);
        continue;
      }
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
