#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> a;
bool ok(map<int, int> d, int i) {
  int b = a[0];
  int c = a[i];
  d[b]--;
  d[c]--;
  int j = 2;
  for (int b = a[0], c = a[i]; d[b ^ c] && j < N;) {
    d[b ^ c]--;
    c = b ^ c;
    b = c ^ b;
    j++;
  }
  return j == N;
}
int main() {
  cin >> N;
  a = vector<int>(N);
  map<int, int> d;
  for (int i = 0; i < (int)N; i++) {
    cin >> a[i];
    d[a[i]] += 1;
  }
  for (int i = 1; i < N; i++) {
    if (ok(d, i)) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
