#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  if (n % 3) printf("No\n");
  if (a[n / 3] == 0 && a[n / 3 + 1] == a[n])
    printf("Yes\n");
  else if ((a[1] ^ a[n / 3 + 1] ^ a[n]) == 0 && a[1] == a[n / 3] &&
           a[n / 3 + 1] == a[n / 3 * 2] && a[n / 3 * 2 + 1] == a[n])
    printf("Yes\n");
  else
    printf("No\n");
}
