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