#include <bits/stdc++.h>
using namespace std;
long long power(long long i, long long j) {
  if (j == 0) return 1;
  long long t = power(i, j / 2) % 1000000007;
  if (j % 2 == 0)
    return (t % 1000000007 * t % 1000000007) % 1000000007;
  else
    return ((t % 1000000007 * t % 1000000007) % 1000000007 * (i % 1000000007) %
            1000000007) %
           1000000007;
}
bool is(long long i) {
  if (i == 1) return 0;
  long long f = 0;
  for (long long j = 2; j <= sqrt(i); j++) {
    if (i % j == 0) {
      f = 1;
      break;
    }
  }
  return !f;
}
int main() {
  long long n;
  cin >> n;
  long long xr = 0;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    xr ^= v[i];
  }
  map<long long, long long> ma;
  ma.insert({0, 1});
  for (long long i = 0; i < n; i++) {
    if (ma.find(v[i]) == ma.end()) {
      ma.insert({v[i], 1});
    }
    long long x = v[i] * (v[(i + 1) % n]);
    if (ma.find(x) == ma.end()) {
      ma.insert({x, 1});
    }
  }
  if (ma.find(xr) == ma.end()) {
    cout << "No";
  } else
    cout << "Yes";
}
