// nlather (Nishant Raj Lather)
// Chrollo_Lucifer

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rnd(x, y) uniform_int_distribution<ll>(x, y)(rng)
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }
    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};
#define boost ios_base::sync_with_stdio(false);cin.tie(nullptr);
#define rep(i, x, n) for(ll i = (x); i < (n); i++)
#define rrep(i, x, n) for(ll i = (x); i >= (n); i--)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#define e emplace
#define mp make_pair
#define debug(this) cerr<<"> "<<#this<<" : "<<this<<"\n"
using ll = long long int;
using ld = long double;
using pii = pair< ll, ll >;
using vi = vector< ll >;
using vvi = vector< vi >;
const ll MOD = 1e9+7;
const ll INF = 0x3f3f3f3f;
const ld PI=3.1415926535897932384626;
const ld EPS = 1e-9;
#define endl '\n'

int main() {
	boost
      ll n;
	cin >> n;
	if(n == 3) {
		ll x, y, z;
		cin >> x >> y >> z;
		if((x ^ y) == z) cout << "Yes\n";
		else cout << "No\n";
	} else cout << "No\n";
}
