#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long MOD = 1e9 + 7;
double EPS = 1e-8;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (int)(n); i++) cin >> a[i];
  sort(a.begin(), a.end());
  map<int, int> mp;
  for (int i = (0); i < (int)(n); i++) mp[a[i]]++;
  bool f = true;
  if (mp.size() != 3)
    f = false;
  else {
    vector<int> u, v;
    for (auto&& p : mp) {
      u.push_back(p.first);
      v.push_back(p.second);
    }
    if (((u[0] ^ u[1]) ^ u[2]) != 0) f = false;
    if (v[0] == v[1] & v[1] == v[2])
      ;
    else
      f = false;
  }
  string yes = "Yes", no = "No";
  cout << (f ? yes : no) << endl;
  return 0;
}
