#include <bits/stdc++.h>
int asc(const void *a, const void *b) { return *(long *)a - *(long *)b; }
int main(void) {
  int n;
  scanf("%d", &n);
  long list[n];
  for (int i = 0; i < n; i++) {
    scanf("%ld", &list[i]);
  }
  qsort(list, n, sizeof(long), asc);
  for (int i = 0; i < n; i++) {
  }
  short result = 1;
  for (int i = 2; i < n; i++) {
    if ((list[i - 2] ^ list[i]) != list[i - 1]) result = 0;
  }
  if ((list[n - 2] ^ list[0]) != list[n - 1]) {
    result = 0;
  }
  if ((list[n - 1] ^ list[1]) != list[0]) {
    result = 0;
  }
  if (result == 1)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
