#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x *= f;
}
const int N = 100010;
int a[N];
int main() {
  int n;
  read(n);
  if (n % 3 == 0) {
    for (int i = 1; i <= n; i++) read(a[i]);
    sort(a + 1, a + n + 1);
    int las = a[1], s = 1, fl = 1, x = a[1];
    for (int i = 2; i <= n; i++)
      if (las != a[i]) {
        if (s != n / 3) fl = 0;
        las = a[i], s = 1, x ^= a[i];
      } else
        s++;
    puts(fl && !x ? "Yes" : "No");
  } else {
    bool fl = 1;
    int las;
    read(las), n--;
    for (int i = 1; i <= n; i++) {
      int x;
      read(x);
      if (x != las) fl = 0;
    }
    puts(fl ? "Yes" : "No");
  }
  return 0;
}
