#include <bits/stdc++.h>
using namespace std;
using namespace std;
int binary(int bina) {
  int ans = 0;
  for (int i = 0; bina > 0; i++) {
    ans = ans + (bina % 2) * pow(10, i);
    bina = bina / 2;
  }
  return ans;
}
using namespace std;
int main() {
  long n;
  std::cin >> n;
  if (n % 3 != 0) {
    std::cout << "No" << std::endl;
    return 0;
  }
  std::vector<long> a(n);
  int k = 0;
  std::vector<int> b(n);
  long mx = 0;
  long sum = 0;
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
    k = k ^ a[i];
    mx = max(mx, a[i]);
    sum += a[i];
  }
  int keta = 1;
  while (true) {
    if (mx / 2 == 0)
      break;
    else
      mx = mx / 2;
    keta++;
  }
  if (k != 0) {
    std::cout << "No" << std::endl;
    return 0;
  }
  std::cout << ((sum == (2) * (pow(2, keta) - 1)) ? "Yes" : "No") << std::endl;
}
