#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int main() {
  long long N;
  cin >> N;
  vector<long long> a(N);
  for (long long i = 0; i < N; i++) cin >> a[i];
  sort(a.begin(), a.end());
  ;
  priority_queue<long long, std::vector<long long>, std::greater<long long> >
      que;
  for (long long i = 0; i < N; i++) {
    for (long long j = i + 1; j < N; j++) {
      que.push(a[i] ^ a[j]);
    }
  }
  long long count = 0;
  while (!que.empty()) {
    if (que.top() == a[count]) {
      count++;
    }
    que.pop();
    if (count == N - 1) break;
  }
  if (count == N - 1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
