#include <bits/stdc++.h>

#define pb(k) push_back(k)
#define mp(k,d) make_pair(k,d)
#define ts(k) to_string(k)
#define F first
#define S second
#define INF (ll)(1e9+7)
#define ll long long
#define ld long double
#define pii pair<int, int>

using namespace std;


int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
    //cout<<fixed;
    //cout.precision(9);
    //mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
    int n, s=0;
    cin>>n;
    vector<int>a(n);
    set<int>d;
    for(int i=0;i<n;i++){
    	cin>>a[i];
    	s += (a[i] > 0);
    	d.insert(a[i]);
    }
    if(n==3 && a[0]^a[1]==a[2]){
    	return cout<<"Yes", 0;
    }
    if(n%3==0 && d.size()==3){
    	int z=0;
    	for(int u: s){
    		z = z ^ u;
    	}
    	if(z == 0)
    		return cout<<"Yes", 0;
    	else
    		return cout<<"No", 0;
    }
    if(s==0){
    	return cout<<"Yes", 0;
    }
    if(n>3 && s>0){
    	return cout<<"No", 0;
    }
    cout<<"Yes";

}