#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
bool dfs(int a0, int a1, int l, int m, const set<int> &st) {
  if (st.empty()) {
    return m == (l ^ a0) && a0 == (m ^ a1);
  }
  set<int> copy = st;
  for (auto &r : st) {
    if (m == (l ^ r)) {
      copy.erase(r);
      if (dfs(a0, a1, m, r, copy)) return true;
      copy.insert(r);
    }
  }
  return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; ++i) cin >> a[i];
  set<int> st;
  for (int i = 1; i < N; ++i) st.insert(a[i]);
  for (int i = 1; i < N; ++i) {
    st.erase(a[i]);
    if (dfs(a[0], a[i], a[0], a[i], st)) {
      cout << "Yes\n";
      return 0;
    }
    st.insert(a[i]);
  }
  cout << "No\n";
  return 0;
}
