#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<int, int> u;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    u[x]++;
  }
  if (u.find(0) != u.end() && u[0] == n) return cout << "Yes" << endl, 0;
  if ((n % 3) || (u.size() != 3)) return cout << "No" << endl, 0;
  int v = 0;
  for (auto it : u)
    if (it.second != n / 3)
      return cout << "No" << endl, 0;
    else
      v ^= it.first;
  if (v == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
