#include <bits/stdc++.h>
using namespace std;
template <typename T>
void fin(T a) {
  cout << a << endl;
  exit(0);
}
int main() {
  int n, now = 0;
  cin >> n;
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    m[a]++;
  }
  if (m.count(0) && m[0] == n) fin("Yes");
  for (auto p : m) {
    now ^= p.first;
    if (p.second * 3 != n) fin("No");
  }
  if (now) fin("No");
  fin("Yes");
}
