#include <bits/stdc++.h>
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
vector<int> n;
int check() {
  int o = 1;
  for (int q = 0; q < n.size() && o; q++)
    o &= n[q] == (n[(q - 1 + n.size()) % n.size()] ^ n[(q + 1) % n.size()]);
  return o;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  ;
  int a, nn = 1;
  cin >> a;
  vector<int> m(a);
  for (int q = 0; q < a; q++) cin >> m[q], nn &= m[q] == 0;
  sort(m.begin(), m.end());
  if (nn || (m.size() == 3 && (m[0] ^ m[1]) == m[2])) {
    cout << "Yes";
    return 0;
  } else
    cout << "No";
}
