#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, tmp;
  cin >> N;
  vector<int> A;
  for (int i = 0; i < N; i++) {
    cin >> tmp;
    A.push_back(tmp);
  }
  sort(A.begin(), A.end());
  bool flag = true;
  for (int i = 0; i < N - 2; i++) {
    int tmp2 = A[i] ^ A[i + 1];
    if (tmp2 != A[i + 2]) {
      flag = false;
      break;
    }
  }
  flag = (A[A.size() - 2] ^ A[A.size() - 1] == A.back() ? true & flag : false);
  cout << (flag ? "Yes" : "No") << endl;
  return 0;
}
