#include <bits/stdc++.h>
using namespace std;
bool solve() {
  int n;
  cin >> n;
  map<int, int> m;
  int res = 0;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    m[t]++;
    if (m[t] == 1) res ^= t;
  }
  if (m.size() == 1) return true;
  if (n % 3) return false;
  for (auto x : m) {
    if (x.second != n / 3) return false;
  }
  return res == 0;
}
int main() {
  if (solve())
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
