#include <bits/stdc++.h>
const long long MOD = 1000000007;
int upcmpii(const void *a, const void *b) {
  return (*(int *)a == *(int *)b ? 0 : (*(int *)a > *(int *)b ? 1 : -1));
}
void sort_ui(int *a, int n) { qsort(a, n, sizeof(int), upcmpii); }
int main() {
  int n;
  scanf("%d", &n);
  int a[101010];
  for (long long i = 0; i < (long long)(n); i++) scanf("%d", a + i);
  sort_ui(a, n);
  int tmp[101010], idx = 0;
  tmp[0] = a[0];
  for (long long i = 0; i < (long long)(n - 1); i++) {
    if (tmp[idx] != a[i + 1]) {
      idx++;
      tmp[idx] = a[i + 1];
    }
  }
  if (idx >= 3)
    puts("No");
  else {
    int xorsum = tmp[0];
    for (long long i = 0; i < (long long)(idx); i++) {
      xorsum ^= tmp[i + 1];
    }
    if (xorsum == 0)
      puts("Yes");
    else
      puts("No");
  }
}
