#include <bits/stdc++.h>
int a[100000], r[100000], used[100000];
int Cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int Check(int N, int n) {
  int i, c;
  if (n == N) {
    if ((r[n - 1] ^ r[1]) == r[0])
      return 1;
    else
      return 0;
  }
  if (n == 1) {
    for (i = 0; i < N; i++) {
      if (used[i] != -1) continue;
      used[i] = 1;
      r[n] = a[i];
      if (Check(N, n + 1) == 1) break;
      used[i] = -1;
    }
    if (i < N)
      return 1;
    else
      return 0;
  }
  c = r[n - 2] ^ r[n - 1];
  for (i = 0; i < N; i++) {
    if (used[i] == -1 && a[i] == c) {
      used[i] = 1;
      r[n] = a[i];
      if (Check(N, n + 1) == 1) break;
      used[i] = -1;
    }
    if (a[i] > c) return 0;
  }
  if (i < N)
    return 1;
  else
    return 0;
}
void Do(int N) {
  int i;
  for (i = 0; i < N; i++) {
    scanf("%d", &a[i]);
    used[i] = -1;
  }
  qsort(a, N, sizeof(int), Cmp);
  r[0] = a[0];
  used[0] = 1;
  if (Check(N, 1) == 1)
    printf("Yes\n");
  else
    printf("No\n");
}
int main(void) {
  int N;
  scanf("%d", &N);
  Do(N);
  return 0;
}
