#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll N, a;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) {
    cin >> a;
    A[i] = a;
  }
  sort(A.begin(), A.end());
  string ans = "No";
  bool finish = false;
  while (next_permutation(A.begin(), A.end())) {
    for (int i = 0; i < N; i++) {
      if (i == 0) {
        if (A[i] != (A[N - 1] ^ A[i + 1])) break;
      } else if (i == N - 1) {
        if (A[i] != (A[i - 1] ^ A[0])) break;
      } else {
        if (A[i] != (A[i - 1] ^ A[i + 1])) break;
      }
      if (i == N - 1) {
        finish = true;
        ans = "Yes";
      }
    }
    if (finish) break;
  }
  cout << ans << endl;
}
