#include <bits/stdc++.h>
using namespace std;
const int MAX = 100001;
vector<int> A;
int main() {
  int N, a;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a;
    A.push_back(a);
  }
  A.push_back(MAX * 2);
  sort(A.begin(), A.end());
  set<int> S;
  for (int i = 1; i < N; i++) {
    int x = 0;
    int y = i;
    S.erase(S.begin(), S.end());
    S.insert(i);
    for (int j = 1; j <= N - 1; j++) {
      int b = A[x] ^ A[y];
      vector<int>::iterator it = lower_bound(A.begin(), A.end(), b);
      x = y;
      y = distance(A.begin(), it);
      if (*it == b) {
        while (S.find(y) != S.end() && A[y] == b) {
          y++;
        }
        if (A[y] != b) break;
        S.insert(y);
      } else {
        break;
      }
      if (j == N - 1) {
        cout << "Yes" << endl;
        exit(0);
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
