#include <bits/stdc++.h>
bool solve() {
  int N;
  scanf("%d", &N);
  std::map<int64_t, int> hat;
  int64_t xor_sum{};
  for (int i{}; i < N; i++) {
    int64_t tmp;
    scanf("%lld", &tmp);
    hat[tmp]++;
    xor_sum ^= tmp;
  }
  std::vector<int64_t> a(N);
  if (N % 3) return hat[xor_sum] == N;
  if (xor_sum != 0) return false;
  for (auto& e : hat)
    if (e.second != N / 3) return false;
  return true;
}
int main() {
  if (solve())
    puts("Yes");
  else
    puts("No");
  return 0;
}
