#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < N; i++) {
    if (a[i] != 0) {
      break;
    }
    if (i == N - 1) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  map<int, int> cnt;
  for (int i = 0; i < N; i++) {
    cnt[a[i]] += 1;
  }
  if (cnt.size() != 3) {
    cout << "No" << endl;
    return 0;
  }
  static int bb = 0;
  auto begin = cnt.begin(), end = cnt.end();
  for (auto iter = begin; iter != end; iter++) {
    bb = bb ^ iter->first;
    static int cc = iter->second;
    if (cc != iter->second) {
      cout << "No" << endl;
      return 0;
    }
  }
  if (bb == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
  return 0;
  return 0;
}
