#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int binary_search_find_index(std::vector<unsigned long long> v, int data) {
  auto it = std::lower_bound(v.begin(), v.end(), data);
  if (it == v.end() || *it != data) {
    return -1;
  } else {
    return it - v.begin();
  }
}
int main(void) {
  int n;
  vector<unsigned long long> a;
  unsigned long long c[100001];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int b;
    scanf("%d", &b);
    a.push_back(b);
  }
  sort(a.begin(), a.end());
  c[0] = a[0];
  c[1] = a[1];
  int used[100001];
  memset(used, 0, sizeof(used));
  used[0] = 1;
  for (int i = 2; i < n; i++) {
    int index = binary_search_find_index(a, c[i - 2] ^ c[i - 1]);
    if (index == -1) goto bad;
    int j = 0;
    c[i] = c[i - 2] ^ c[i - 1];
    if (c[n - 2] ^ c[n - 1] == c[0] && c[n - 1] ^ c[0] == c[1]) {
      goto ok;
    }
  }
bad:
  printf("No\n");
  return 0;
ok:
  printf("Yes\n");
  return 0;
}
