#include <bits/stdc++.h>
using namespace std;
int BinSearch(int num, const int* pnData, int nNumOf) {
  int iFirst = 0;
  int iLast = nNumOf - 1;
  int iComp;
  int nComped;
  while (iLast - iFirst > 0) {
    iComp = (iFirst + iLast) / 2;
    nComped = pnData[iComp] - num;
    if (nComped == 0) return iComp;
    if (nComped < 0)
      iFirst = iComp + 1;
    else
      iLast = iComp - 1;
  }
  if (iLast - iFirst < 0 || pnData[iFirst] != num) return -1;
  return iFirst;
}
int main(void) {
  int N;
  cin >> N;
  int a[N];
  int c = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  sort(a, a + N);
  for (int i = 0; i < N - 1; i++) {
    for (int k = i + 1; k < N; k++) {
      int b = BinSearch(i ^ k, a, N);
      if (b != -1 && i != b && b != k && k != i) {
        c++;
      }
    }
  }
  if (c + 2 >= N) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
