#include <bits/stdc++.h>
int upll(const void* a, const void* b) {
  return *(long long*)a < *(long long*)b   ? -1
         : *(long long*)a > *(long long*)b ? 1
                                           : 0;
}
void sortup(long long* a, int n) { qsort(a, n, sizeof(long long), upll); }
long long a[100010];
long long c[100010];
long long cc[100010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  sortup(a, n);
  int pre = -1, cnt = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != pre) c[cnt++] = a[i];
    pre = a[i];
    cc[cnt - 1]++;
  }
  if (cnt == 1) {
    puts("Yes");
  } else if (cnt == 2) {
    puts(c[0] == 0 && cc[0] * 2 == cc[1] ? "Yes" : "No");
  } else if (cnt == 3) {
    puts((c[0] ^ c[1] ^ c[2]) == 0 && cc[0] == cc[1] && cc[1] == cc[2] ? "Yes"
                                                                       : "No");
  } else {
    puts("No");
  }
}
