#include <bits/stdc++.h>
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
void QSort(int x[], int left, int right);
void Swap(int x[], int i, int j);
void QSort(int x[], int left, int right) {
  int i, j;
  int pivot;
  i = left;
  j = right;
  pivot = x[(left + right) / 2];
  while (1) {
    while (x[i] < pivot) i++;
    while (pivot < x[j]) j--;
    if (i >= j) break;
    Swap(x, i, j);
    i++;
    j--;
  }
  if (left < i - 1) QSort(x, left, i - 1);
  if (j + 1 < right) QSort(x, j + 1, right);
}
void Swap(int x[], int i, int j) {
  int temp;
  temp = x[i];
  x[i] = x[j];
  x[j] = temp;
}
int main() {
  int i, j, k, n, d, x, a[100000], b[100000], flag = 0, flag2 = 0;
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  QSort(a, 0, n - 1);
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      for (k = 0; k < n; k++) {
        if (i == k || j == k) {
          continue;
        } else {
          x = a[i] ^ a[j];
          if (a[k] == x && flag == 0) {
            b[0] = a[i];
            b[1] = a[k];
            b[2] = a[j];
            flag = 1;
          }
        }
      }
    }
  }
  for (i = 3; i < n; i++) {
    flag2 = 0;
    for (j = i + 1; j < n; j++) {
      if (i == j)
        continue;
      else {
        x = b[i - 2] ^ a[j];
        if (x == b[i - 1]) {
          b[i] = a[j];
          flag2 = 1;
          break;
        }
      }
    }
    if (flag2 == 0) {
      cout << "No" << endl;
      return 0;
    }
  }
  x = b[n - 2] ^ b[0];
  if (x == b[n - 1]) cout << "Yes" << endl;
  return 0;
}
