#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int a[N], n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  bool f = true;
  for (int i = 0; i < n - 2; i++)
    if (a[i] ^ a[i + 1] != a[i + 2]) f = false;
  printf("%s\n", f ? "Yes" : "No");
  return 0;
}
