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