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