#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  if (n >= 4)
    printf("No\n");
  else {
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    if (a == (b ^ c))
      printf("Yes\n");
    else
      printf("No\n");
  }
}
