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