#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 {
    std::size_t index = std::distance(v.begin(), it);
    return index;
  }
}
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];
  for (vector<unsigned long long>::iterator it = a.begin() + 1; it != a.end();
       it++) {
    c[1] = (*it);
    for (int i = 2; i < n; i++) {
      int used[100001];
      memset(used, 0, sizeof(used));
      used[0] = 1;
      int index = binary_search_find_index(a, c[i - 2] ^ c[i - 1]);
      if (index == -1) goto bad;
      int j = 0;
      while (1) {
        if (used[index + j] == 1) {
          if (index + j + 1 >= n) goto bad;
          if (a[index + j + 1] == (c[i - 2] ^ c[i - 1])) {
            j++;
          } else {
            goto bad;
          }
        } else {
          used[index + j] = 1;
          c[i] = a[index + j];
          if (i == n - 1) {
            if (c[n - 2] ^ c[n - 1] == c[0] && c[n - 1] ^ c[0] == c[1]) {
              goto ok;
            } else {
              goto bad;
            }
          }
          break;
        }
      }
    }
  bad:
    1;
  }
  printf("No\n");
  return 0;
ok:
  printf("Yes\n");
  return 0;
}
