#include <bits/stdc++.h>
using namespace std;
int n;
map<int, int> cnt;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int x, diff = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (cnt.count(x) == 0) diff++;
    cnt[x]++;
  }
  if (cnt[0] == n) {
    cout << "Yes" << endl;
    return 0;
  }
  if (diff != 3 || n % 3) {
    cout << "No" << endl;
    return 0;
  }
  x = 0;
  for (auto it : cnt) {
    x ^= it.first;
    if (it.second != n / 3) {
      cout << "No" << endl;
      return 0;
    }
  }
  if (x != 0) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
