#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) {
    if (A[0] ^ A[1] == A[2]) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}
