#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <bits/stdc++.h>
using namespace __gnu_pbds;
using namespace std;

typedef tree<int, null_type, less<int>, rb_tree_tag,tree_order_statistics_node_update>	tree_set;
typedef long long ll;
typedef long double ld;
void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}

ll mod=1e9 + 7;
bool func(ll arr[],ll n)
{
    for(ll i=0;i<n;i++)
    {
        ll l =(i-1+n)%n;
        ll r = (i+1)%n;

        ll xr = arr[l]^arr[r];
        if(xr!=arr[i])
            return false;
    }
    return true;
}

int main()
{
    fast();
    ll n;
    cin>>n;

    ll arr[n];
    for(ll i=0;i<n;i++)
        cin>>arr[i];

    sort(arr,arr+n);

    if(func(arr,n))
        cout<<"Yes";
    else
        cout<<"No";
}


