#include <bits/stdc++.h>
using namespace std;
long long i, j, k;
long long a, b;
double sec;
long long n;
long long arr[100005];
unordered_map<long long, long long> x;
unordered_map<long long, bool> mp;
unsigned long long xor64(void);
int main() {
  scanf("%lld %lld", &n, &arr[0]);
  for (i = 1; i < n; i++) {
    scanf("%lld", &arr[i]);
    if (x[arr[i]] == 0) {
      k++;
    }
    x[arr[i]]++;
  }
  for (int i = 0; i < 100000; i++) {
    int x = xor64() % (unsigned long long)(n - 1) + 1;
    int y = xor64() % (unsigned long long)(n - 1) + 1;
    {
      long long tmp = arr[x];
      arr[x] = arr[y];
      arr[y] = tmp;
    }
  }
  for (i = 1; i < n && k > 0; i++) {
    if (mp[arr[i]]) continue;
    k--;
    unordered_map<long long, long long> tmp = x;
    a = arr[0];
    b = arr[i];
    tmp[b]--;
    for (j = 2; j < n; j++) {
      long long f = a ^ b;
      if (tmp[f]) {
        tmp[f]--;
        a = b;
        b = f;
      } else {
        mp[arr[i]] = true;
        break;
      }
    }
    if (!(j ^ n)) {
      if (arr[0] == (a ^ b) && arr[i] == (b ^ arr[0])) {
        puts("Yes");
        return 0;
      } else {
        mp[arr[i]] = true;
      }
    }
  }
  puts("No");
  return 0;
}
unsigned long long xor64(void) {
  static unsigned long long x = 88172645463325252ULL;
  x = x ^ (x << 13);
  x = x ^ (x >> 7);
  x = x ^ (x << 17);
  return x;
}
