#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 P = pair<ll, ll>;
using grid = vector<vector<int>>;
const int dx[2] = {1, 0};
const int dy[2] = {0, 1};
const int INF = 1 << 30;
const ll mod = 998244353LL;
int main() {
  int 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]]++;
  int cnt = 0;
  for (auto x : m) cnt++;
  bool can = true;
  if (cnt > 3) can = false;
  if (cnt == 2) can = false;
  if (cnt == 1) {
    if (m[0] == 0) can = false;
  }
  if (cnt == 3) {
    int t = 0;
    vector<ll> c(3);
    int n = 0;
    for (auto x : m) {
      t ^= x.first;
      c[n] = x.second;
      n++;
    }
    if (t != 0) can = false;
    if (c[0] != c[1] || c[1] != c[2]) can = false;
  }
  if (can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
