#include <bits/stdc++.h>
unsigned long buffer[(100000)];
int used[(100000) + 1];
int check_perm(unsigned long N, unsigned long *a, unsigned long *buf) {
  for (int i = 1; i < N - 1; i++) {
    if ((a[buf[i - 1]] ^ a[buf[i + 1]]) != a[buf[i]]) return -1;
  }
  if ((a[buf[N - 2]] ^ a[buf[0]]) != a[buf[N - 1]]) return -1;
  return 0;
}
int perm_sub(int n, int m, unsigned long *a) {
  int ret;
  if (n == m) {
    ret = check_perm(n, a, buffer);
    if (ret == 0) return 0;
  } else {
    for (int i = 0; i < n; i++) {
      if (used[i]) continue;
      buffer[m] = i;
      used[i] = (1);
      ret = perm_sub(n, m + 1, a);
      if (ret == 0) return 0;
      used[i] = (0);
    }
  }
  return -1;
}
int ans(unsigned long N, unsigned long *a) { return perm_sub(N, 0, a); }
int main(void) {
  char input[((10 + 1) * 100000)];
  char *ptr;
  char sep[] = " \t\r\n";
  int loop;
  unsigned long tmp, N;
  unsigned long A[100000];
  int ret;
  fgets(input, sizeof(input) - 1, stdin);
  ptr = strtok(input, sep);
  if (ptr == NULL) return -1;
  N = strtoul(ptr, NULL, 10);
  if (N < 2) {
    printf("zzNo\n");
    return 0;
  }
  fgets(input, sizeof(input) - 1, stdin);
  ptr = strtok(input, sep);
  for (loop = 0; loop < N; loop++) {
    if (ptr == NULL) return -1;
    tmp = strtol(ptr, NULL, 10);
    A[loop] = tmp;
    ptr = strtok(NULL, sep);
  }
  ret = ans(N, A);
  if (ret == 0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
