#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void rd(T &x) {
  x = 0;
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 - '0' + c, c = getchar();
  x *= f;
}
multiset<int> s;
int n;
int main() {
  int x, y, z, ox;
  rd(n);
  rd(x), rd(y);
  for (int i = 3; i <= n; ++i) rd(z), s.insert(z);
  ox = x;
  while (s.size()) {
    z = x ^ y;
    if (!s.count(z)) {
      printf("No\n");
      exit(0);
    }
    s.erase(s.find(z));
    x = y, y = z;
  }
  if ((x ^ y) != ox)
    printf("No\n");
  else
    printf("Yes\n");
  return 0;
}
