#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> a;
void solve();
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    int k;
    scanf("%d", &k);
    a.push_back(k);
  }
  solve();
  return 0;
}
void solve() {
  vector<int> x;
  x.push_back(a.at(0));
  a.erase(a.begin());
  for (int i = 0; i < (int)a.size() - 1; i++) {
    for (int j = i + 1; j < (int)a.size(); j++) {
      if ((a.at(i) ^ a.at(j)) == x.at(0)) {
        x.push_back(a.at(i));
        a.erase(a.begin() + i);
      } else {
        printf("No\n");
        return;
      }
    }
  }
  while (a.size() > 1) {
    for (int i = 0; i < (int)a.size(); i++) {
      if ((x.at((int)x.size() - 2) ^ a.at(i)) == x.at((int)x.size() - 1)) {
        x.push_back(a.at(i));
        a.erase(a.begin() + i);
        break;
      } else {
        printf("No\n");
        return;
      }
    }
  }
  if ((x.at((int)x.size() - 1) ^ x.at(0)) == a.at(0)) {
    printf("Yes\n");
    return;
  } else {
    printf("No\n");
    return;
  }
}
