#include <bits/stdc++.h>
template <class T>
inline void read(T &res) {
  res = 0;
  bool bo = 0;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  if (c == '-')
    bo = 1;
  else
    res = c - 48;
  while ((c = getchar()) >= '0' && c <= '9')
    res = (res << 3) + (res << 1) + (c - 48);
  if (bo) res = ~res + 1;
}
const int N = 1e5 + 5;
int n, a[N], tot, val[N], len[N];
int main() {
  read(n);
  for (int i = 1; i <= n; i++) read(a[i]);
  std::sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++)
    if (i == 1 || a[i] > a[i - 1])
      val[++tot] = a[i], len[tot] = 1;
    else
      len[tot]++;
  if (n % 3) return puts(tot == 1 && val[1] == 0 ? "Yes" : "No"), 0;
  if (tot > 3) return puts("No"), 0;
  if (tot == 1) return puts(val[1] == 0 ? "Yes" : "No"), 0;
  if (tot == 3)
    return puts((val[1] ^ val[2] ^ val[3]) == 0 && len[1] == len[2] &&
                        len[2] == len[3]
                    ? "Yes"
                    : "No"),
           0;
  return puts(len[2] * 2 == len[1] && val[1] == 0 ? "Yes" : "No"), 0;
}
