#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  const long long size = 100000;
  long long a[size] = {0};
  bool fin[size] = {0};
  cin >> N;
  long long j = 0;
  for (j = 0; j < N; j++) {
    cin >> a[j];
  }
  long long i[3] = {0};
  for (long long j = 0; j < N; j++) {
    for (long long k = j + 1; k < N + j; k++) {
      for (long long l = k + 1; l < N + k; l++) {
        i[0] = l % N;
        i[1] = k % N;
        i[2] = j % N;
        if (i[1] == (i[0] ^ i[2])) {
          cout << "Yes" << endl;
          return 0;
        }
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
