#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> mp;
int n, a, i;
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d", &a), ++mp[a];
  if (mp.size() == 1 && mp[0] == n) return puts("Yes"), 0;
  i = 0;
  for (auto u : mp)
    if (i ^= u.first, u.second * 3 != n) return puts("No"), 0;
  puts(i ? "No" : "Yes");
  return 0;
}
