#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, A[200000], z;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> A[i];
  if (n == 3) {
    z = 0;
    for (int i = 0; i < n; i++)
      if (A[0] == A[1] ^ A[2] && A[1] == A[0] ^ A[2] && A[2] == A[0] ^ A[1])
        z = 1;
  } else {
    z = 1;
    sort(A, A + n);
    if (n % 2) {
      if (A[0] != A[n - 1]) z = 0;
    } else {
      for (int i = 0; i < n / 2; i++)
        if (A[2 * i] != A[2 * i + 1]) z = 0;
    }
  }
  if (z)
    cout << "Yes";
  else
    cout << "No";
}
