#include <bits/stdc++.h>
using namespace std;
int A[100005];
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) scanf("%d", A + i);
  sort(A, A + N);
  if (N % 3)
    printf("No");
  else {
    if (A[0] != A[N / 3 - 1] || A[N / 3] != A[N / 3 * 2 - 1] ||
        A[N / 3 * 2] != A[N - 1] || (A[0] ^ A[N / 3] ^ A[N - 1]) != 0)
      printf("No");
    else
      printf("Yes");
  }
  return 0;
}
