#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  vector<int> list(N, 0);
  list[0] = a[0];
  list[1] = a[1];
  int list_end = 2;
  for (int i = 1; i < N; i++) {
    int x = list[i - 1] ^ list[i];
    auto F = find(a.begin(), a.end(), x);
    if (F == a.end()) {
      cout << "No" << endl;
      return 0;
    } else {
      list[list_end] = *F;
      list_end++;
      a.erase(F);
    }
  }
  if (list[N - 1] ^ list[1] == list[0] &&
      list[0] ^ list[N - 2] == list[N - 1]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
