#include <bits/stdc++.h>
using namespace std;
int dx4[] = {1, 0, -1, 0};
int dy4[] = {0, 1, 0, -1};
int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy8[] = {0, 1, 1, 1, 0, -1, -1, -1};
inline void swap(long long* a, long long* b) {
  long long temp = *a;
  *a = *b;
  *b = temp;
}
inline long long add(long long a, long long b, long long m) {
  return a + b >= m ? a + b - m : a + b;
}
inline long long sub(long long a, long long b, long long m) {
  return a - b < 0 ? a - b + m : a - b;
}
inline long long mul(long long a, long long b) {
  return a * 1ll * b % 1000000007;
}
inline long long setbits(long long a) { return __builtin_popcount(a); }
inline long long bit32(long long a) { return 31 - __builtin_clz(a); }
inline long long bit64(long long a) { return 63 - __builtin_clzll(a); }
inline long long parent(long long a) { return (a - 1) >> 1; }
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (int i = 0; i < v.size(); i++) {
    os << v[i];
    if (i != v.size() - 1) os << ",";
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  os << "[";
  for (auto it : v) {
    os << it;
    if (it != *v.rbegin()) os << ",";
  }
  os << "]\n";
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const map<T, S>& v) {
  for (auto it : v) os << it.first << " : " << it.second << endl;
  return os;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  os << "(";
  os << v.first << "," << v.second << ")";
  os << "\n";
  return os;
}
long long a[100005];
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  bool ans = true;
  sort(a, a + n);
  for (long long i = 0; i < n - 2; i++) {
    if (a[i] ^ a[i + 2] != a[i + 1]) {
      ans = false;
      break;
    }
  }
  if (ans)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
