#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1 << 30;
const ll MOD = (ll)1e9 + 7;
const ll MAX_N = (ll)1e5 + 5;
ll check;
bool solve(multiset<ll> st, ll v, ll b) {
  if (st.empty()) {
    if (check ^ b == v) return true;
    return false;
  }
  int nv = v ^ b;
  if (st.count(nv) == 0) return false;
  st.erase(nv);
  return solve(st, nv, v);
}
signed main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;
  cin >> n;
  multiset<ll> st;
  for (ll i = 0; i < n; i++) {
    ll x;
    cin >> x;
    st.insert(x);
  }
  ll v = *st.begin();
  st.erase(st.begin());
  for (auto x : st) {
    ll b = x;
    check = b;
    st.erase(b);
    if (solve(st, v, b)) {
      cout << "Yes" << endl;
      return 0;
    }
    st.insert(b);
  }
  cout << "No" << endl;
  return 0;
}
