#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n;
  cin >> n;
  long long a[n];
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
  }
  long long f = 0;
  long long x = a[0] ^ a[1];
  mp[a[0]]--;
  mp[a[1]]--;
  if (mp[a[0]] == 0) {
    mp.erase(a[0]);
  }
  if (mp[a[1]] == 0) {
    mp.erase(a[1]);
  }
  if (!mp[x]) {
    cout << "No" << endl;
    return 0;
  }
  mp[x]--;
  if (mp[x] == 0) {
    mp.erase(x);
  }
  long long y = a[1];
  for (long long j = 1; j < n - 2; j++) {
    long long z = x ^ y;
    if (!mp[z]) {
      cout << "No" << endl;
      return 0;
    }
    mp[z]--;
    if (mp[z] == 0) {
      mp.erase(z);
    }
    y = x;
    x = z;
  }
  cout << "Yes" << endl;
  return 0;
}
