#include <bits/stdc++.h>
using namespace std;
int n, i, a[100005];
int read() {
  char ch = getchar();
  int xx = 0;
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') {
    xx = xx * 10 + ch - '0';
    ch = getchar();
  }
  return xx;
}
int main() {
  n = read();
  for (i = 1; i <= n; i++) a[i] = read();
  sort(a + 1, a + n + 1);
  if (n % 3 != 0) {
    printf("No\n");
    return 0;
  } else {
    for (i = 1; i <= n; i++)
      if (i != 1 && i != n / 3 + 1 && i != n / 3 * 2 + 1)
        if (a[i] != a[i - 1]) {
          printf("No\n");
          return 0;
        }
    if ((a[1] ^ a[n / 3 + 1] ^ a[n / 3 * 2 + 1]) == 0)
      printf("Yes\n");
    else
      printf("No\n");
    return 0;
  }
  return 0;
}
