#include <bits/stdc++.h>
using namespace std;
int n, a;
map<int, int> c;
int main() {
  cin >> n;
  for (int i = (1); i <= (n); i++) {
    cin >> a;
    c[a]++;
  }
  if (c.size() != 3) return puts("no"), 0;
  int las = c.begin()->second;
  int w[5], cur = 0;
  for (auto x : c) {
    if (x.second != las) return puts("No"), 0;
    w[cur++] = x.first;
  }
  if ((w[0] ^ w[1]) == w[2])
    puts("Yes");
  else
    puts("No");
  return 0;
}
