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