#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  bool flag = true;
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  int tmp = 1, cnt, hoge = 0;
  while (hoge + 1 < n && a[hoge] == a[hoge + 1]) tmp++, hoge++;
  hoge++;
  while (hoge < n) {
    cnt = 1;
    while (hoge + 1 < n && a[hoge] == a[hoge + 1]) cnt++, hoge++;
    hoge++;
    if (tmp != cnt) {
      flag = false;
      break;
    }
  }
  if (n % 3 || !flag)
    cout << "No" << endl;
  else {
    a.erase(unique(a.begin(), a.end()), a.end());
    flag = true;
    if (a.size() != 3)
      flag = false;
    else if ((a[0] ^ a[1] ^ a[2]) != 0)
      flag = false;
    if (flag)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
