#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double PI = 3.141592653589793238462643383279;
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 55;
signed main() {
  ll N;
  cin >> N;
  set<ll> st;
  for (ll i = 0; i < N; i++) {
    ll a;
    cin >> a;
    st.insert(a);
  }
  if (st.size() != 3) {
    cout << "No" << endl;
    return 0;
  }
  vector<ll> vec;
  for (auto it = st.begin(); it != st.end(); it++) {
    vec.push_back(*it);
  }
  if (vec[0] == vec[1] ^ vec[2]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
