#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pi = pair<int, int>;
constexpr ll mod = 1000000007;
void pPRINTl(ostream& ost) { ost << endl; }
template <class T>
void pPRINTL(ostream& ost, T t) {
  ost << t << endl;
}
template <class T, class... U>
void pPRINTl(ostream& ost, T t, U... u) {
  ost << t << " ";
  pPRINTl(ost, u...);
}
void pPRINT(ostream& ost) {}
template <class T>
void pPRINT(ostream& ost, T t) {
  ost << t;
}
template <class T, class... U>
void pPRINT(ostream& ost, T t, U... u) {
  ost << t << " ";
  pPRINT(ost, u...);
}
template <class... T>
void PRINT(T... t) {
  pPRINT(cout, t...);
}
int main() {
  ll n;
  cin >> n;
  ll a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  ll x[3];
  for (int i = 0; i < 3; i++) x[i] = -1;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 3; j++) {
      if (x[j] == a[i]) break;
      if (x[j] < 0) {
        x[j] = a[i];
        break;
      }
      if (j == 2) {
        PRINT("No");
        return 0;
      }
    }
  }
  if (x[0] ^ x[1] == x[2])
    PRINT("Yes");
  else
    PRINT("No");
  return 0;
}
