#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
signed main(void) {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  ;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  sort((A).begin(), (A).end());
  for (int i = 0; i < 2 * N; i++) {
    int j = i % N;
    int next = (i + 1) % N;
    int prev = (i - 1 + N) % N;
    if ((A[next] ^ A[prev]) != A[j]) {
      cout << "No" << '\n';
      return 0;
    }
  }
  cout << "Yes" << '\n';
  return 0;
}
