#include <bits/stdc++.h>
using namespace std;
const int N = 101010;
int n, cnt, a[N], c[N], g[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + n + 1);
  int tot = 1;
  c[1] = a[1];
  g[1] = 1;
  for (int i = 2; i <= n; i++)
    if (a[i] != a[i - 1])
      c[++tot] = a[i], g[tot] = 1;
    else
      g[tot]++;
  if (n % 3 != 0)
    if (tot > 3)
      puts("No");
    else if (tot == 1 && c[1] == 0)
      puts("Yes");
    else if (n % 3 != 0)
      puts("No");
    else if (tot == 2 && g[2] == g[1] * 2 && c[1] == 0)
      puts("Yes");
    else if (tot == 3 && c[1] ^ c[2] ^ c[3] == 0 && g[1] == g[2] &&
             g[1] == g[3])
      puts("Yes");
    else
      puts("No");
  return 0;
}
