#include <bits/stdc++.h>
using namespace std;
using P = pair<long long, long long>;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1e9;
const long long MOD = 1e9 + 7;
signed main() {
  long long N;
  cin >> N;
  vector<long long> a(N);
  long long zero = 0;
  for (long long(i) = (0); (i) < (N); (i)++) {
    cin >> a[i];
    if (a[i] == 0) {
      zero++;
    }
  }
  sort((a).begin(), (a).end());
  if (zero != 0 && zero != N && zero % 2 == 0) {
    if (count((a).begin(), (a).end(), a[zero]) == N - zero) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  if (N != 3)
    cout << "No" << endl;
  else {
    if (a[0] ^ a[1] == a[2])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
