#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, a[N], x, y, z;
map<int, int> f;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 2, ok; i <= n; i++) {
    x = a[1];
    ok = 1;
    for (int j = 2; j <= n; j++) f[a[j]]++;
    f[a[i]]--;
    y = a[i];
    for (int j = 3; j <= n; j++) {
      z = x ^ y;
      if (f[z])
        f[z]--;
      else {
        ok = 0;
        break;
      }
      x = y;
      y = z;
    }
    if (a[1] ^ x == y && ok) {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
  return 0;
}
