#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int n;
long long a[maxn];
map<long long, int> Map;
inline long long read() {
  char c = getchar();
  long long x = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
void dfs(long x, long y, int cnt) {
  if (cnt == n) {
    if (x ^ y == a[1]) {
      puts("Yes");
      exit(0);
    }
    return;
  }
  if (Map.find(x ^ y) != Map.end()) {
    Map[x ^ y]--;
    if (Map[x ^ y] == 0) Map.erase(x ^ y);
    dfs(y, x ^ y, cnt + 1);
    Map[x ^ y]++;
  }
  return;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    Map[a[i]]++;
  }
  Map.erase(a[1]);
  for (int i = 2; i <= n; i++) {
    if (Map.find(a[1] ^ a[i]) != Map.end()) {
      Map[a[i]]--;
      if (Map[a[i]] == 0) Map.erase(a[i]);
      dfs(a[1], a[i], 2);
      Map[a[i]]++;
    }
  }
  puts("No");
  return 0;
}
