#include <bits/stdc++.h>
using namespace std;
const int INF = 100100100;
const long long LINF = 1e18 + 100;
const int MOD = 1e9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ;
  int N;
  cin >> N;
  map<long long, int> m;
  for (int i = 0; i < (N); i++) {
    long long x;
    cin >> x;
    m[x]++;
  }
  bool ok = false;
  if (m.size() == 1 && m.begin()->first == 0) {
    ok = true;
  } else if (m.size() == 2) {
    int zn, xn;
    for (auto kv : m) {
      if (kv.first == 0) {
        zn = kv.second;
      } else {
        xn = kv.second;
      }
    }
    if (xn * 2 + zn == N) {
      ok = true;
    }
  } else if (m.size() == 3) {
    int n = 0;
    set<int> s;
    int xr = 0;
    for (auto kv : m) {
      s.insert(kv.second);
      xr = xr ^ kv.first;
    }
    if (s.size() == 1 && xr == 0) {
      ok = true;
    }
  }
  cout << (ok ? "Yes" : "No") << endl;
}
