#include <bits/stdc++.h>
using namespace std;
long long int binary(int bina) {
  int ans = 0;
  for (int i = 0; bina > 0; i++) {
    ans = ans + (bina % 2) * pow(10, i);
    bina = bina / 2;
  }
  return ans;
}
int main() {
  int n;
  int a, b, c;
  long long int aa = 0b0;
  long long int ba = 0b0;
  long long int ca = 0b0;
  string as[3];
  cin >> n;
  if (n != 3) {
    cout << "NO" << endl;
  } else {
    cin >> a >> b >> c;
    aa = binary(a);
    ba = binary(b);
    ca = binary(c);
    if ((aa ^ ba) == ca) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
