#include <bits/stdc++.h>
using namespace std;
template <typename T>
void PTA(T* a, int n) {
  for (int i = 0; i < n; i++) {
    cout << "a[" << i << "] = " << a[i] << endl;
  }
}
const int maxn = 1e5 + 10;
const auto ptint = PTA<int>;
int T, n;
int a[maxn];
set<int> s;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 3) {
    if ((a[0] ^ a[1]) == a[2])
      puts("Yes");
    else
      puts("No");
  } else {
    for (int i = 0; i < n; i++) s.insert(a[i]);
    if (2 - n % 2 != s.size() || !s.count(0)) {
      puts("No");
    } else
      puts("Yes");
  }
  return 0;
}
