#include <bits/stdc++.h>
int main() {
  int N, K, X, A, B, D, tmp1, tmp2, i = 0, ans = 0, cst = 1;
  std::cin >> N;
  std::vector<int> a(N);
  while (std::cin >> tmp1) {
    a[i] = tmp1;
    i++;
    if (i >= N) {
      break;
    }
  }
  int flag = 0;
  for (int i = 1; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      if ((int)(a[i - 1] ^ a[j]) == a[i]) {
        int tmp = a[i + 1];
        a[i + 1] = a[j];
        a[j] = tmp;
        flag++;
        break;
      }
      if (flag == 0) {
        std::cout << "No" << std::endl;
        return 0;
      }
      flag = 0;
    }
  }
  std::cout << "Yes" << std::endl;
  return 0;
}
