#include <bits/stdc++.h>
using namespace std;
long long n, x;
map<long long, int> ma;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &x);
    ma[x]++;
  }
  if (ma.size() == 1 && ma[0])
    printf("Yes\n");
  else {
    long long la = -1, a = -1;
    for (auto A : ma) {
      la = a, a = A.first;
      if (la != -1 && a != -1) break;
    }
    ma[la]--, ma[a]--;
    long long f = la, ff = a;
    while (n >= 3) {
      long long now = la ^ a;
      if (ma[now] == 0) {
        printf("No\n");
        return 0;
      }
      ma[now]--;
      la = a, a = now;
      n--;
    }
    printf("%s\n", la ^ a == f && f ^ ff == a ? "Yes" : "No");
  }
  return 0;
}
