#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
long long n;
long long a[N], ans[N];
map<long long, long long> f;
vector<long long> v;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  bool cur = 1;
  sort(a + 1, a + n + 1);
  for (long long i = n + 1; i <= 2 * n; i++) a[i] = a[i - n];
  for (long long i = 2; i + 1 <= 2 * n; i++)
    if (a[i] != (a[i - 1] ^ a[i + 1])) cur = 0;
  if (cur)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
