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