#include <bits/stdc++.h>
void quick_sort(int a[], int first, int last);
int binary_search(int a[], int n, int l, int r);
int main(void) {
  int N, i, exc;
  scanf("%d", &N);
  int a[N], ans[N];
  for (i = 0; i < N; i++) scanf("%d", &a[i]);
  quick_sort(a, 0, N - 1);
  ans[0] = a[0];
  ans[1] = a[1];
  int flag;
  for (i = 0; i < N - 2; i++) {
    exc = ans[i] ^ ans[i + 1];
    flag = binary_search(a, exc, 0, N - 1);
    if (flag == -1) {
      printf("No\n");
      break;
    } else
      ans[i + 2] = a[flag];
  }
  if (flag != -1) {
    if ((ans[N - 2] ^ ans[N - 1]) == ans[0])
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
void quick_sort(int a[], int first, int last) {
  int tmp;
  int k;
  int flag = 1;
  int p = a[first];
  int i = first, j = last;
  while (flag) {
    while (a[i] < p) i++;
    while (p < a[j]) j--;
    if (i < j) {
      tmp = a[i];
      a[i] = a[j];
      a[j] = tmp;
      i++;
      j--;
    } else
      flag = 0;
  }
  if (first < i - 1) quick_sort(a, first, i - 1);
  if (j + 1 < last) quick_sort(a, j + 1, last);
}
int binary_search(int a[], int n, int l, int r) {
  if (r < l)
    return -1;
  else {
    int mid = l + (l + r) / 2;
    if (a[mid] < n)
      return binary_search(a, n, l + 1, r);
    else if (n < a[mid])
      return binary_search(a, n, l, r - 1);
    else {
      a[mid] = -1;
      return mid;
    }
  }
}
