#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  for (int i = 1; i < N - 1; ++i) {
    int tmp = 0;
    for (int j = i + 1; j <= N; ++j) {
      if (j == N) {
        cout << "No" << endl;
        return 0;
      }
      tmp = A[i - 1] ^ A[j];
      if (tmp == A[i]) {
        swap(A[i], A[j]);
        break;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
