#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  long a[N];
  map<long, int> numMap;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (numMap.find(a[i]) != numMap.end()) {
      numMap[a[i]] += 1;
    } else {
      numMap[a[i]] = 1;
    }
  }
  bool result = true;
  int count = 0;
  int number = 0;
  long A = 0, B = 0, C = 0;
  for (auto b = numMap.begin(); b != numMap.end(); b++) {
    count++;
    if (number == 0) {
      number = b->second;
    } else if (number != b->second) {
      result = false;
      break;
    }
    if (A == 0) {
      A = b->first;
    } else if (B == 0) {
      B = b->first;
    } else if (C == 0) {
      C = b->first;
    }
  }
  if (count != 3) {
    result = false;
  }
  if ((A ^ B ^ C) != 0) {
    result = false;
  }
  cout << (result ? "Yes" : "No") << endl;
  return 0;
}
