#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int n, val[maxn];
bool vis[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &val[i]);
    vis[val[i]] = true;
  }
  sort(val + 1, val + 1 + n);
  val[0] = val[n];
  int t, flag = 0;
  for (int i = 1; i <= n; i++) {
    t = val[i] ^ val[i - 1];
    if (!vis[t]) flag = 1;
  }
  if (flag)
    printf("No\n");
  else
    printf("Yes\n");
  return 0;
}
