#include <bits/stdc++.h>
using namespace std;
const long long MX = 1e6;
const long long inf = 1e13;
const long long mod = 1e9 + 7;
signed main() {
  long long n;
  cin >> n;
  if (n != 3) {
    cout << "No" << endl;
    return 0;
  }
  vector<long long> a(n);
  for (long long i = (0); i < (n); ++i) cin >> a[i];
  if (a[0] ^ a[1] == a[2])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
