#include <bits/stdc++.h>
using namespace std;
vector<int> A;
map<int, int> S, ori;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ((void)0);
  ((void)0);
  ((void)0);
  int N;
  cin >> N;
  A.resize(N);
  for (int i = 0; i < N; i++) cin >> A[i], S[A[i]]++;
  S[A[0]]--;
  ori = S;
  for (int i = 1; i < N; i++)
    if (A[0] && A[i] && S.count(A[i] ^ A[0]) ||
        ((A[0] == 0 || A[i] == 0) && S[A[0] ^ A[i]] > 1)) {
      int p = A[i], c = A[i] ^ A[0];
      bool valid = true;
      S[p]--;
      S[c]--;
      for (int j = 3; j < N; j++) {
        tie(p, c) = make_pair(c, p ^ c);
        if (S[c]-- == 0) {
          valid = false;
          break;
        }
      }
      if (valid) {
        cout << "Yes\n";
        return 0;
      }
      S = ori;
    }
  cout << "No\n";
  return 0;
}
