#include <bits/stdc++.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int A, B, C, D, E, F, N, M, K, L, X, Y, Z, H, W, sum = 0, num = 0,
                                                             flag = 0;
  string S, T;
  cin >> N;
  vector<long long int> P(N, 0);
  for (long long int i = 0; i < N; i++) cin >> P[i];
  sort(P.begin(), P.end());
  for (long long int i = 0; i < N; i++)
    if ((P[i] ^ P[(i - 1 + N) % N] ^ P[(i + 1) % N]) != 0) flag = 1;
  if (!flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
