#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1001001001001001LL;
const long long int MOD = 1000000007;
long long int di[] = {-1, 0, 1, 0, -1, 1, 1, -1};
long long int dj[] = {0, 1, 0, -1, 1, 1, -1, -1};
signed main() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  bool flag = true;
  for (long long int i = 0; i < n; i++) {
    if ((a[i] ^ a[(i + 2) % n]) != a[(i + 1) % n]) flag = false;
  }
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
