#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
int a[N];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  if (n > 3) {
    if (*min_element(a, a + n) != *max_element(a, a + n) || a[0]) {
      cout << "No\n";
      return 0;
    }
    cout << "Yes\n";
    return 0;
  }
  sort(a, a + n);
  do {
    char can = 1;
    can &= a[0] == (a[1] ^ a[2]);
    can &= a[1] == (a[0] ^ a[2]);
    can &= a[2] == (a[0] ^ a[1]);
    if (can) {
      cout << "Yes\n";
      return 0;
    }
  } while (next_permutation(a, a + n));
  cout << "No\n";
}
