#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a[100001];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  if (n > 3) {
    if (a[n - 1] == 0) {
      cout << "Yes";
    } else {
      cout << "No";
    }
  } else {
    if ((a[0] ^ a[1]) == (a[2]) and (a[0] ^ a[2]) == (a[1]) and
        (a[2] ^ a[1]) == (a[0])) {
      cout << "Yes";
    } else {
      cout << "No";
    }
  }
  return 0;
}
