#include <bits/stdc++.h>
void QSort(int x[], int left, int right);
void Swap(int x[], int i, int j);
int main() {
  int N = 0;
  int a[100000] = {0};
  int tmp;
  scanf("%d", &N);
  for (unsigned int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  QSort(a, 0, N - 1);
  for (unsigned int i = 0; i < N - 2; i++) {
    tmp = a[i] ^ a[i + 2];
    if (tmp != a[i + 1]) {
      printf("No");
      return 0;
    }
  }
  printf("Yes");
  return 0;
}
void QSort(int x[], int left, int right) {
  int i, j;
  int pivot;
  i = left;
  j = right;
  pivot = x[(left + right) / 2];
  while (1) {
    while (x[i] < pivot) i++;
    while (pivot < x[j]) j--;
    if (i >= j) break;
    Swap(x, i, j);
    i++;
    j--;
  }
  if (left < i - 1) QSort(x, left, i - 1);
  if (j + 1 < right) QSort(x, j + 1, right);
}
void Swap(int x[], int i, int j) {
  int temp;
  temp = x[i];
  x[i] = x[j];
  x[j] = temp;
}
