#include <bits/stdc++.h>
using namespace std;
int n;
int a[100010];
int val[100010];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  memset(val, -1, sizeof(val));
  int idx = 0;
  for (int i = 0; i < n; i++) {
    val[idx] = a[i];
    idx = (idx + 3) % n;
    if (val[idx] == -1) idx++;
  }
  bool ok = ((a[n - 1] ^ a[1]) == a[0]) && ((a[n - 2] ^ a[0]) == a[n - 1]);
  for (int i = 1; i < n - 1; i++) ok &= ((a[i - 1] ^ a[i + 1]) == a[i]);
  if (ok)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
