#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn];
int b[maxn];
map<int, int> ma;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ma[a[i]] = 1;
  }
  sort(a, a + n);
  int flag = 1;
  for (int i = 1; i < n - 1; i++) {
    if (ma[a[i] ^ a[i - 1]] != 1 || ma[a[i] ^ a[i + 1]] != 1) flag = 0;
  }
  if (flag)
    printf("Yes\n");
  else
    puts("No");
  return 0;
}
