#include <bits/stdc++.h>
using namespace std;

long long n,a[100010];

int main(){
    cin>>n;
    for(int i=0;i<n;i++)cin>>a[i];
    sort(a,a+n);
    if(n%3!=0){
        if(a[n-1]==0)cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
        return 0;
    }
    sort(a,a+n);
    if(a[0]==a[n/3-1] && a[n/3]==a[n/3*2-1] && a[n/3*2]==a[n-1] && a[n/3*2]==(a[0]^a[n/3])cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}