#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <typename A, typename B>
istream& operator>>(istream&, pair<A, B>&);
template <typename A>
istream& operator>>(istream&, vector<A>&);
void add(int&, int);
int mul(int, int);
int powz(int, int);
int sub(int, int);
template <typename A>
ostream& operator<<(ostream&, vector<A>&);
const int N = 500001;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  cin >> a;
  sort(a.begin(), a.end());
  int flag = 0;
  for (int i = 1; i < n - 1; i++) {
    if (a[i] != (a[i - 1] ^ a[i + 1])) {
      flag++;
      break;
    }
  }
  if (flag)
    cout << "No";
  else
    cout << "Yes";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int tc = 1;
  for (int _ = 0; _ < tc; _++) {
    solve();
    if (_ != tc - 1) cout << "\n";
  }
}
int mul(int a, int b) { return ((a)*1ll * (b)) % mod; }
void add(int& a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
int sub(int a, int b) {
  a -= b;
  if (a < 0) {
    a += mod;
  }
  return a;
}
int powz(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = mul(res, a);
    b /= 2;
    a = mul(a, a);
  }
  return res;
}
template <typename A, typename B>
istream& operator>>(istream& input, pair<A, B>& x) {
  input >> x.first >> x.second;
  return input;
}
template <typename A>
istream& operator>>(istream& input, vector<A>& x) {
  for (auto& i : x) input >> i;
  return input;
}
template <typename A>
ostream& operator<<(ostream& output, vector<A>& x) {
  for (auto& i : x) output << i << ' ';
  return output;
}
