#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, now;
int a[N];
map<int, int> cnt;
int main() {
  int i;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]), cnt[a[i]]++;
  for (i = 1; i < n; i++) {
    now = a[i] ^ a[i + 1];
    cnt[now]--;
    if (cnt[now] < 0) {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}
