#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  map<int, int> occs;
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    occs[x]++;
  }
  string answer = "No";
  if (n % 4 == 0) {
    if (occs[0] == n / 2 && occs.size() == 2) {
      answer = "Yes";
    }
  }
  if (n % 3 == 0) {
    bool allEqual = true;
    int xorAll = 0;
    if (occs.size() == 3) {
      for (auto pp : occs) {
        if (pp.second != n / 3) allEqual = false;
        xorAll ^= pp.first;
      }
    }
    if (allEqual && (xorAll == 0)) answer = "Yes";
  }
  printf("%s\n", answer.c_str());
  return 0;
}
