#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n > 3) return puts("No"), 0;
  int a, b, c;
  cin >> a >> b >> c;
  if ((a ^ b) == c && (a ^ c) == b && (b ^ c) == a) return puts("Yes"), 0;
  return puts("No"), 0;
  return 0;
}
