#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  int ans = 0;
  for (int i = 0; i < N; i++) {
    vector<int> tmp(N);
    tmp = a;
    tmp.erase(tmp.begin() + i);
    for (int j = 0; j < N - 1; j++) {
      for (int k = j + 1; k < tmp.size(); k++) {
        if (a[i] == (tmp[j] ^ tmp[k])) ans++;
      }
    }
  }
  if (ans >= N)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
