#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N;
  cin >> N;
  vector<long long> A(N);
  long long res = 0;
  bool ao = true;
  map<long long, long long> mp;
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
    if (A[i] != 0) ao = false;
    mp[A[i]]++;
  }
  if (ao) {
    cout << "Yes" << endl;
    return 0;
  }
  if (mp.size() == 3) {
    long long t = -1;
    long long x = 0;
    bool ok = true;
    for (auto m : mp) {
      x ^= m.first;
      if (t == -1) {
        t = m.second;
      } else {
        if (t != m.second) {
          ok = false;
        }
      }
    }
    if (ok && x == 0) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}
