#include <bits/stdc++.h>
const long long MOD = 1000000007;
int main() {
  int n;
  scanf("%d", &n);
  int a[101010];
  for (long long i = 0; i < (long long)(n); i++) scanf("%d", a + i);
  int ng = 0;
  for (long long i = 0; i < (long long)(31); i++) {
    int xorsum = (a[0] & (1 << i)), allzero = 1;
    for (long long i = 0; i < (long long)(n - 1); i++) {
      xorsum = ((a[i + 1] & (1 << i)) ^ xorsum);
      if ((a[i + 1] & (1 << i)) != 0) allzero = 0;
    }
    if (allzero != 0 && xorsum != 0) {
      ng = 1;
      break;
    }
  }
  if (ng == 0)
    puts("Yes");
  else
    puts("No");
}
