#pragma GCC optimization_level 3
#include <iostream>
#include <cstdio>
#include <unordered_map>
using namespace std;
typedef long long ll;

ll i, j, k;
ll a, b;

ll n;
ll arr[100005];
unordered_map<ll, ll> x;
unordered_map<ll, bool> mp;

int main()
{
    scanf("%lld %lld", &n, &arr[0]);
    for (i = 1; i < n; i++) {
        scanf("%lld", &arr[i]);
        x[arr[i]]++;
    }

    for (i = 1; i < n ; i++) {
        if (i > 10000) break;
        if (mp[arr[i]]) continue;
        
        unordered_map<ll, ll> tmp = x;

        a = arr[0];
        b = arr[i];
        tmp[b]--;

        for (j = 2; j < n; j++) {
            ll f = a ^ b;

            if (tmp[f]) {
                tmp[f]--;
                a = b;
                b = f;
            }
            else {
                mp[arr[i]] = true;
                goto quit;
            }
        }

        if (arr[0] == (a ^ b) &&
            arr[i] == (b ^ arr[0])) {
            puts("Yes");
            return 0;
        }
        else {
            mp[arr[i]] = true;
        }
    quit:
    }

    puts("No");

    return 0;
}   
