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