#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;
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];
  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 = 3; j < n; j++) {
      if (i == j || flag2 == 1)
        continue;
      else {
        x = b[i - 2] ^ a[j];
        if (x == b[i - 1]) {
          b[i] = a[j];
          flag2 = 1;
        }
      }
    }
    if (flag2 == 0) {
      cout << "No" << endl;
      return 0;
    }
  }
  x = b[n - 2] ^ b[0];
  if (x == b[n - 1]) cout << "Yes" << endl;
  return 0;
}
