#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
using lb = long double;
using P = pair<ll, ll>;
using graph = vector<vector<ll>>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const ll INF = 1LL << 60;
const ll mod = 1000000007LL;
int main() {
  ll N;
  cin >> N;
  vector<ll> v(N);
  for (int i = 0; i < (int)(N); i++) cin >> v[i];
  map<ll, ll> m;
  for (int i = 0; i < (int)(N); i++) m[v[i]]++;
  ll cnt = 0;
  for (auto x : m) cnt++;
  if (cnt >= 4 || cnt == 2 || cnt == 0) cout << "No" << endl;
  if (cnt == 1) {
    ll t = 0;
    for (auto x : m) t = x.first;
    if (t == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  if (cnt == 3) {
    ll t = 0;
    vector<ll> cnt(3);
    ll p = 0;
    for (auto x : m) {
      t ^= x.first;
      cnt[p] = x.second;
      p++;
    }
    if (t == 0 && cnt[0] == cnt[1] && cnt[1] == cnt[2])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
