#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
  }
  if (N > 3) {
    cout << "No" << endl;
    return 0;
  }
  if (A[0] == A[2] ^ A[1] && A[1] == A[2] ^ A[0] && A[2] == A[1] ^ A[0]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
