#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch = getchar();
  int w = 1, c = 0;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') w = -1;
  for (; isdigit(ch); ch = getchar()) c = (c << 1) + (c << 3) + (ch ^ 48);
  return w * c;
}
const int M = 1e5 + 10;
int n, w[M], r[M];
int main() {
  n = read();
  for (int i = (1); i <= (n); ++i) w[i] = read();
  sort(w + 1, w + n + 1);
  int N = 0, len = 1;
  w[n + 1] = -1;
  for (int i = (1); i <= (n); ++i) {
    if (w[i] != w[i + 1]) r[++N] = len, len = 0;
    len++;
  }
  if (N == 1 && w[1] == 0) return puts("Yes"), 0;
  if (N == 2 && w[1] == 0 && !(r[1] ^ r[2])) return puts("Yes"), 0;
  if (N == 3)
    if (w[1] ^ w[2] == w[3] && !(r[1] ^ r[2]) && !(r[1] ^ r[3]))
      return puts("Yes"), 0;
  puts("No");
  return 0;
}
