#include <bits/stdc++.h>
long long int mod = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.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());
  vector<int> b(n);
  for (int i = 0; i < n - 1; i++) {
    b[i] = a[i] ^ a[i + 1];
  }
  b[n - 1] = a[n - 1] ^ a[0];
  sort(b.begin(), b.end());
  bool flag = false;
  for (int i = 0; i < n; i++)
    if (a[i] != b[i]) flag = true;
  if (flag)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
