#include <bits/stdc++.h>
using namespace std;
using LL = long long;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int INF = 1e9;
const LL LLINF = 1e16;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (n); i++) cin >> a[i];
  bool f = 0;
  sort((a).begin(), (a).end());
  a.erase(unique((a).begin(), (a).end()), a.end());
  if (a.size() == 3) {
    if ((a[0] ^ a[1]) == a[2]) f = 1;
    if ((a[1] ^ a[2]) == a[0]) f = 1;
    if ((a[2] ^ a[0]) == a[1]) f = 1;
  } else if (a.size() == 1) {
    if (a[0] == 0) f = 1;
  }
  cout << (f ? "Yes" : "No") << endl;
}
