#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int a[N];
  bool flg[N];
  int tmp[3];
  bool result = true;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    flg[i] = true;
  }
  tmp[0] = a[0];
  flg[0] = false;
  for (int n = 1; n < N; n++) {
    for (int i = 1; i < N; i++) flg[i] = true;
    tmp[1] = a[n];
    flg[n] = false;
    for (int i = 1; i < N; i++) {
      if ((tmp[n - 1] ^ tmp[n]) == a[i] && flg[i]) {
        tmp[n + 1] = a[i];
        flg[i] = false;
        if (i == N - 1) {
          cout << "Yes" << endl;
          return 0;
        }
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
