#include <bits/stdc++.h>
void swap(unsigned long *x, unsigned long *y) {
  int temp;
  temp = *x;
  *x = *y;
  *y = temp;
}
int partition(unsigned long array[], int left, int right) {
  int i, j, pivot;
  i = left;
  j = right + 1;
  pivot = left;
  do {
    do {
      i++;
    } while (array[i] < array[pivot]);
    do {
      j--;
    } while (array[pivot] < array[j]);
    if (i < j) {
      swap(&array[i], &array[j]);
    }
  } while (i < j);
  swap(&array[pivot], &array[j]);
  return j;
}
void quick_sort(unsigned long array[], int left, int right) {
  int pivot;
  if (left < right) {
    pivot = partition(array, left, right);
    quick_sort(array, left, pivot - 1);
    quick_sort(array, pivot + 1, right);
  }
}
int main(void) {
  int i, j, k;
  int N;
  unsigned long a[100000], temp;
  scanf("%d", &N);
  for (i = 0; i < N - 1; i++) {
    scanf("%ld\n", &a[i]);
  }
  scanf("%ld", &a[i]);
  quick_sort(a, 0, N - 1);
  for (i = 1; i < N - 1; i++) {
    if (a[i] != (a[i - 1] ^ a[i + 1])) {
      printf("No\n");
      return 0;
    }
  }
  if (a[N - 1] != (a[0] ^ a[N - 2])) {
    printf("No\n");
    return 0;
  }
  if (a[0] != (a[1] ^ a[N - 1])) {
    printf("No\n");
    return 0;
  }
  printf("No\n");
  return 0;
}
