#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, c, d, m, n, k;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i < n - 2; i++) {
    if (a[i] ^ a[i + 2] != a[i + 1]) {
      puts("No");
      return 0;
    }
  }
  puts(a[n - 1] != a[n - 2] ^ a[0] || a[0] == a[n - 1] ^ a[1] ? "Yes" : "No");
  return 0;
}
