#include <bits/stdc++.h>
using namespace std;
int n;
int* a;
bool* used;
bool check(int num) {
  int lb = -1, ub = n;
  while (ub - lb > 1) {
    int mid = (ub + lb) / 2;
    if (a[mid] >= num) {
      ub = mid;
    } else {
      lb = mid;
    }
  }
  if (a[ub] == num) {
    for (int i = ub; i < n; i++) {
      if (a[i] != num) return false;
      if (used[i]) continue;
      return true;
    }
    return false;
  } else {
    return false;
  }
}
int main() {
  cin >> n;
  a = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 1; i < n; i++) {
    int* circle = new int[n];
    used = new bool[n];
    for (int j = 0; j < n; j++) {
      used[j] = false;
    }
    circle[0] = a[0];
    circle[1] = a[i];
    used[i] = true;
    int next;
    bool ok = true;
    for (int j = 2; j < n; j++) {
      next = circle[j - 2] ^ circle[j - 1];
      if (check(next) == false) {
        ok = false;
        break;
      }
    }
    if (ok) {
      cout << "Yes";
      return 0;
    }
  }
  cout << "No";
  return 0;
}
