#include <bits/stdc++.h>
inline int input() {
  int x;
  scanf("%d", &x);
  return x;
}
const int maxn = 100005;
int a[maxn], b[maxn];
std::map<int, int> val;
int main() {
  int n = input();
  for (int i = 1; i <= n; i++) a[i] = input();
  std::sort(a + 1, a + n + 1);
  if (n % 3 == 0) {
    int p = 1;
    for (int i = 1; i <= n; i += 3) b[i] = a[p++];
    if (a[p - 1] != a[1]) return puts("No"), 0;
    for (int i = 2; i <= n; i += 3) b[i] = a[p++];
    if (a[p - 1] != a[2]) return puts("No"), 0;
    for (int i = 3; i <= n; i += 3) b[i] = a[p++];
    if (a[p - 1] != a[3]) return puts("No"), 0;
    if ((b[3] ^ b[1]) != b[2]) return puts("No"), 0;
    return puts("Yes"), 0;
  } else {
    if (a[1] == a[n] and a[1] == 0)
      return puts("Yes"), 0;
    else
      return puts("No"), 0;
  }
}
