#include <bits/stdc++.h>
using namespace std;
int n, a;
map<int, int> cnt;
int main(int argc, char const *argv[]) {
  scanf("%d", &n);
  while (n--) {
    scanf("%d", &a);
    ++cnt[a];
  }
  if (cnt.size() == 1) {
    puts(cnt.begin()->first == 0 ? "Yes" : "No");
  } else if (cnt.size() == 2) {
    int a = cnt.begin()->second, b = cnt.rbegin()->second;
    if (a > b) swap(a, b);
    puts(2 * a == b ? "Yes" : "No");
  } else if (cnt.size() == 3) {
    int sum = 0;
    for (auto it : cnt) {
      sum ^= it.first;
    }
    puts(sum ? "No" : "Yes");
  } else {
    puts("No");
  }
}
