#include <bits/stdc++.h>
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int n, a[1000000];
  int ans, count;
  int flag = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  qsort(a, n, sizeof(int), compare_int);
  for (int i = 0; i < n; i++) {
    if (i != 0) {
      ans = a[i - 1] ^ a[i + 1];
      if (ans == a[i]) {
        count++;
      } else {
        flag = 1;
        break;
      }
    } else if (i == n - 1) {
      ans = a[i - 1] ^ a[0];
      if (ans == a[i]) {
        count++;
      } else {
        flag = 1;
        break;
      }
    } else {
      ans = a[i + 1] ^ a[n - 1];
      if (ans == a[i]) {
        count++;
      } else {
        flag = 1;
        break;
      }
    }
  }
  if (count == n - 1) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
}
