#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (auto &a : A) cin >> a;
  sort(A.begin(), A.end());
  A.erase(unique(A.begin(), A.end()), A.end());
  if (A.size() == 1 && A[0] == 0) {
    cout << "Yes" << endl;
    return 0;
  }
  if (A.size() != 3 || N % 3) {
    cout << "No" << endl;
  } else {
    if ((A[0] ^ A[1]) == A[2]) {
      cout << "Yes" << endl;
      return 0;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
