#include <bits/stdc++.h>
using namespace std;
long long n;
long long arr[100005];
map<long long, long long> x;
map<pair<long long, long long>, bool> mp;
int main() {
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
    x[arr[i]]++;
  }
  for (long long i = 1; i < n; i++) {
    if (mp[pair<long long, long long>(arr[0], arr[i])]) continue;
    map<long long, long long> tmp = x;
    long long a = arr[0];
    long long b = arr[i];
    pair<long long, long long> idx = pair<long long, long long>(a, b);
    tmp[a]--, tmp[b]--;
    for (long long j = 2; j < n; j++) {
      long long f = a ^ b;
      if (tmp[f]) {
        tmp[f]--;
        a = b;
        b = f;
      } else {
        mp[idx] = true;
        break;
      }
    }
    if (arr[0] == (a ^ b)) {
      puts("Yes");
      return 0;
    } else {
      mp[idx] = true;
    }
  }
  puts("No");
  return 0;
}
