#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
const int INF = 0x3fffffff;
const int N = 100010;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int n, x;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  map<int, int> cnt;
  for (int i = (1); i <= (n); ++i) cin >> x, cnt[x]++;
  if (cnt.size() <= 3) {
    int a[4], b[4], m = 0;
    for (auto x : cnt) {
      a[++m] = x.first;
      b[m] = x.second;
    }
    bool flag = false;
    if (m == 1 && a[1] == 0) flag = true;
    if (m == 2 && b[1] == b[2] * 2 && (a[1] ^ a[1] ^ a[2]) == 0) flag = true;
    if (m == 2 && b[1] * 2 == b[2] && (a[1] ^ a[2] ^ a[2]) == 0) flag = true;
    if (m == 3 && b[1] == b[2] && b[1] == b[3] && (a[1] ^ a[2] ^ a[3]) == 0)
      flag = true;
    if (flag) {
      cout << "Yes\n";
      return 0;
    }
  }
  cout << "No\n";
  return 0;
}
