#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for (int i = 0; i < (N); i++) cin >> a[i];
  sort(a.begin(), a.end());
  vector<int> x;
  x.push_back(a[0]);
  for (int i = 0; i < (N); i++)
    if (x.back() != a[i]) x.push_back(a[i]);
  if (x.size() == 3 && ((x[0] ^ x[1]) == x[2]))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
