#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5, mod = 1e9 + 7;
int a[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  sort(a + 1, a + 1 + n);
  a[0] = a[n], a[n + 1] = a[0];
  bool exist = true;
  for (int i = 1; i <= n; ++i) {
    if (a[i - 1] ^ a[i + 1] != a[i]) exist = 0;
  }
  cout << (exist ? "Yes" : "No") << endl;
  return 0;
}
