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