#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, A;
  map<int, int> ma;
  cin >> N;
  for (int i = 0; i < (N); i++) {
    cin >> A;
    ma[A]++;
  }
  if (ma.size() == 3) {
    pair<int, int> a[3];
    int i = 0;
    for (auto it = ma.begin(); it != ma.end(); it++) {
      a[i++] = *it;
    }
    if ((a[0].first ^ a[1].first == a[2].first) && a[0].second == a[1].second &&
        a[1].second && a[2].second) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
