#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  int cnt0 = 0;
  set<int> st;
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
    if (a[i] == 0) {
      ++cnt0;
    } else {
      st.insert(a[i]);
    }
  }
  if (N == 3) {
    array<int, 3> b;
    bool ok = false;
    for (int i = 0; i < 3; ++i) {
      for (int j = 0; j < 3; ++j) {
        if (j == i) {
          continue;
        }
        for (int k = 0; k < 3; ++k) {
          if (k == j || k == i) {
            continue;
          }
          b.fill(0);
          b[0] = a[i];
          b[1] = a[j];
          b[2] = a[k];
          if (b[0] == b[1] ^ b[2] && b[1] == b[0] ^ b[2] &&
              b[2] == b[1] ^ b[0]) {
            ok = true;
          }
        }
      }
    }
    if (ok) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    return 0;
  }
  bool ok = false;
  if (N % 2 == 1 && cnt0 == N) {
    ok = true;
  }
  if (N % 2 == 0 && cnt0 == N / 2 && st.size() == 1) {
    ok = true;
  }
  cout << (ok ? "Yes" : "No") << endl;
  return 0;
}
