#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void rd(T &x) {
  x = 0;
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 - '0' + c, c = getchar();
  x *= f;
}
map<int, int> mp;
int main() {
  int x, n;
  rd(n);
  for (int i = 1; i <= n; ++i) rd(x), mp[x]++;
  if (n % 3) {
    printf("No");
    exit(0);
  };
  int t = n / 3, sum = 0;
  for (map<int, int>::iterator it = mp.begin(); it != mp.end(); ++it) {
    if ((it->second) % t) {
      printf("No");
      exit(0);
    };
    int x = (it->second) / t;
    if (x & 1) sum ^= it->first;
  }
  if (sum) {
    printf("No");
    exit(0);
  };
  printf("Yes");
  return 0;
}
