#include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
using namespace std;
signed main() {
  long long N;
  cin >> N;
  std::vector<long long> v(N);
  for (long long i = 0; i < N; i++) cin >> v[i];
  set<long long> s;
  for (long long i = 0; i < N; i++) s.insert(v[i]);
  if (s.size() != 3) {
    cout << "No" << endl;
    return 0;
  };
  std::vector<long long> w(3);
  long long cnt = 0;
  for (auto p : s) w[cnt++] = p;
  if (w[0] ^ w[1] != w[2]) {
    cout << "No" << endl;
    return 0;
  };
  cout << "Yes" << endl;
}
