#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 2 * 1e18;
const int inf = 1e9 + 7;
int main(void) {
  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 < N; i++) {
    if (a[i] == (a[(i - 1 + N) % N] ^ a[(i + 1 + N) % N])) {
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
