#include <bits/stdc++.h>
using namespace std;
constexpr int nax = 1e5;
int n;
map<int, int> M;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  if (n % 3) return cout << "No" << '\n', 0;
  for (int i = 0; i < n; ++i) {
    int v;
    cin >> v;
    ++M[v];
  }
  if (M.size() != 3) return cout << "No" << '\n', 0;
  int su = 0;
  for (auto& p : M) {
    if (p.second != (n / 3)) return cout << "No" << '\n', 0;
    su xor_eq p.first;
  }
  if (su) return cout << "No" << '\n', 0;
  cout << "Yes" << '\n';
}
