#include <bits/stdc++.h>
using namespace std;
int n;
int a[300001];
int b[100001];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int k = 1;
  sort(a + 1, a + 1 + n);
  a[n + 1] = -2;
  for (int i = 1; a[i + 1] != -2 && i < 300001; i++)
    if (a[i] == a[i + 1]) {
      a[n + k] = a[i];
      a[i] = -1;
      a[n + k + 1] = -2;
      k++;
    }
  for (int i = 1, j = 1; i <= n; i++) {
    while (a[j] == -1) j++;
    b[i] = a[j];
    j++;
  }
  int flag = 0;
  for (int i = 1; i + 2 <= n; i++)
    if ((b[i] ^ b[i + 1]) != b[i + 2]) {
      flag = 1;
      break;
    }
  if ((b[n - 1] ^ b[n]) != b[1]) {
    flag = 1;
  }
  if (flag)
    printf("No\n");
  else
    printf("Yes\n");
  return 0;
}
