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