#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i <= N - 1; ++i) cin >> a[i];
  auto is_zero = [](int n) -> bool { return n == 0; };
  int zeros = count_if(a.begin(), a.end(), is_zero);
  if (a.size() <= zeros * 3) {
    cout << "Yes" << endl;
  } else {
    int p = 0;
    for (int i : a) p ^= i;
    if (is_zero(p))
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
