#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve();
int main(void) {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) cin >> A[i];
  sort(A, A + N);
  if (N % 3 == 0) {
    int first = A[0];
    int second = A[N / 3];
    int third = A[2 * (N / 3)];
    for (int i = 0; i < N; i += 3) {
      A[i] = first;
      A[i + 1] = second;
      A[i + 2] = third;
    }
    if ((A[N - 1] ^ A[1]) != A[0] || (A[N - 2] ^ A[0]) != A[N - 1])
      cout << "No" << endl;
    else {
      for (int i = 1; i <= N - 2; i++) {
        if ((A[i - 1] ^ A[i + 1]) != A[i]) {
          cout << "No" << endl;
          return 0;
        }
      }
      cout << "Yes" << endl;
    }
  } else {
    if (A[N - 1] == 0)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
void solve() {}
