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