#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn];
set<int> s;
set<int>::iterator it;
map<int, int> ma;
int main() {
  int n;
  cin >> n;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ma[a[i]]++;
    s.insert(a[i]);
  }
  int flag = 0;
  if (s.size() == 1) {
    if (*s.begin() == 0) flag = 1;
  } else if (n % 3 == 0) {
    if (s.size() == 2) {
      it = s.begin();
      it++;
      if (ma[*s.begin()] * 2 == ma[*it] && *(s.begin()) == 0) flag = 1;
    } else if (s.size() == 3) {
      it = s.begin();
      int ss = *it;
      int sum = ma[*it];
      it++;
      for (; it != s.end(); it++) ss ^= (*it);
      if (sum == ma[*it] && sum == ma[*(++it)] && ss == 0) flag = 1;
    }
  }
  if (flag)
    puts("Yes");
  else
    puts("No");
  return 0;
}
