#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<unsigned int> a(n + 1);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  a[n + 1] = a[1];
  int zyuzu = 1;
  for (int i = 1; i < n; ++i) {
    zyuzu *= i;
  }
  zyuzu = zyuzu / 2;
  for (int i = 0; i < zyuzu; ++i) {
    if (a[0] == (a[i + 1] ^ a[i + 2])) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
