#include <bits/stdc++.h>
using namespace std;
const long long M = 1000000007;
long long A, B, C, D, N, L, K, P, Q, R, W, X, Y, Z;
string S, T;
signed main() {
  std::cin >> N;
  if (N != 3)
    std::cout << "No" << std::endl;
  else {
    std::cin >> A;
    std::cin >> B;
    std::cin >> C;
    if ((A ^ B) == C)
      std::cout << "Yes" << std::endl;
    else
      std::cout << "No" << std::endl;
  }
}
