#include <bits/stdc++.h>
using namespace std;
int XOR(int a, int b);
int main() {
  int N;
  cin >> N;
  vector<int> a(N), b(N);
  int sum = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    sum = XOR(sum, a[i]);
  }
  if (sum != 0) {
    cout << "No" << endl;
    return 0;
  }
  sort(a.begin(), a.end());
  b[0] = a[0];
  b[1] = a[1];
  int next;
  int cannot = 0;
  for (int i = 2; i < N; i++) {
    next = XOR(b[i - 2], b[i - 1]);
    auto itr = find(a.begin(), a.end(), next);
    if (itr == a.end()) {
      cannot = 1;
      break;
    } else {
      b[i] = *itr;
      *itr = -1;
    }
  }
  if (cannot)
    cout << "No" << endl;
  else {
    cout << "Yes" << endl;
  }
  return 0;
}
int XOR(int a, int b) {
  int ans = 0;
  int mod;
  int x = 0, y = 0;
  for (int i = 0; i <= max(log2(a) + 1, log2(b)); i++) {
    x = 0;
    y = 0;
    mod = pow(2, i + 1);
    if (a % mod != 0) {
      x = 1;
      a -= mod / 2;
    }
    if (b % mod != 0) {
      y = 1;
      b -= mod / 2;
    }
    ans += (mod / 2) * ((x | y) - (x & y));
  }
  return ans;
}
