#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  bool bl = false;
  if (N == 3) {
    int a, b, c;
    cin >> a >> b >> c;
    bitset<32> A(a);
    bitset<32> B(b);
    bitset<32> C(c);
    if ((A ^ B) == C) bl = true;
  }
  cout << (bl ? "Yes" : " No") << endl;
}
