#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  if (N == 3) {
    long long a, b, c;
    cin >> a >> b >> c;
    if (a ^ b == c) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    cout << "No" << endl;
  }
}
