#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    mp[a]++;
  }
  if (mp.size() != 3) {
    cout << "No" << endl;
    return 0;
  }
  int x = 0;
  for (auto &p : mp) {
    if (p.second != n / 3) {
      cout << "No" << endl;
      return 0;
    } else {
      x ^= p.first;
    }
  }
  cout << (x ? "No" : "Yes") << endl;
}
