#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int n;
map<int, int> s;
map<int, int>::iterator it;
int main() {
  scanf("%d", &n);
  for (int i = 1, x; i <= n; ++i) {
    scanf("%d", &x);
    s[x]++;
  }
  if (s.size() == 1 && (*s.begin()).first == 0) return puts("Yes"), 0;
  if (n % 3)
    puts("No");
  else {
    if (s.size() != 3) return puts("No"), 0;
    it = s.begin();
    pair<int, int> x = *it++;
    pair<int, int> y = *it++;
    pair<int, int> z = *it++;
    if ((x.first ^ y.first ^ z.first) == 0 && x.second == y.second &&
        y.second == z.second && x.second == z.second)
      puts("Yes");
    else
      puts("No");
  }
  return 0;
}
