#include <bits/stdc++.h>
const int MOD = 1000000007, INF = 1111111111;
using namespace std;
using lint = long long;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a[i];
  sort(a.begin(), a.end());
  vector<int> mp;
  int tmp;
  for (int i = 0; i < N; i++) {
    tmp = a[i] ^ a[(i + 1) % N];
    mp.emplace_back(tmp);
  }
  sort(mp.begin(), mp.end());
  if (a == mp)
    cout << "Yes"
         << "\n";
  else
    cout << "No"
         << "\n";
  return 0;
}
