#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, A[100000];
  cin >> N;
  for (int i = 0; i < N; i++) cin >> A[i];
  if (N != 3)
    cout << "No" << endl;
  else if ((A[0] ^ A[1]) == A[2])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
