#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll N;
int main() {
  cin >> N;
  vector<ll> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  sort(a.begin(), a.end());
  bool flag = false;
  for (int i = 0; i < N; i++) {
    int left = (i - 1 + N) % N;
    int right = (i + 1 + N) % N;
    if ((a[left] ^ a[right]) == a[i]) flag = true;
  }
  cout << ((flag) ? "Yes" : "No") << endl;
}
