#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
int main() {
  ll N, a, b, c;
  cin >> N;
  set<ll> S;
  multiset<ll> MS;
  for (int i = 0; i < N; i++) {
    cin >> a;
    S.insert(a);
    MS.insert(a);
  }
  if (S.size() == 1) {
    if (*S.begin() == 0) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  if (S.size() == 3) {
    auto it = S.begin();
    a = *it;
    it++;
    b = *it;
    it++;
    c = *it;
    if (MS.count(a) == MS.count(b) && MS.count(b) == MS.count(c) &&
        a ^ b ^ c == 0) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
