#include <bits/stdc++.h>
using namespace std;
void ga(int N, int *A) {
  for (int i(0); i < N; i++) scanf("%d", A + i);
}
map<long long, long long> T;
long long L, N, a, A[1 << 17], B[666];
int main(void) {
  scanf("%lld", &N);
  for (int i(0); i < N; i++) scanf("%lld", &a), ++T[a];
  for (auto &h : T) A[L] = h.first, B[L++] = h.second;
  if (L == 1 && !*A) return puts("Yes"), 0;
  if (L ^ 3) return puts("No"), 0;
  if ((A[0] ^ A[1]) != A[2] || (A[0] ^ A[2]) != A[1] || (A[1] ^ A[2]) != A[0])
    return puts("No"), 0;
  puts(B[1] == *B && B[1] == B[2] ? "Yes" : "No");
  return 0;
}
