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