#include <bits/stdc++.h>
#define ll long long
#define rep(X,N) for(int X = 0; X < N; X++)

using namespace std;

int main(){

    int n;
    cin >> n;

    vector<int> a;
    map<int,int> m;

    rep(i,n){
        int tmp;
        cin >> tmp;
        a.push_back(tmp);
        m[tmp] = m[tmp] + 1;
    }

    bool ans = true;

    vector<pair<int,int>> v;
    map<pair<int,int>, int> checked;

    for(int i = 1; i <= n - 1; i++){
        ans = true;

        map<int, int> tmpm(m);
        int circle1 = a[0];
        int circle2 = a[i];

        v.push_back(make_pair(circle1,circle2));

        tmpm[circle1] = tmpm[circle1] - 1;
        tmpm[circle2] = tmpm[circle2] - 1;

        for(int j = 0; j < n - 2; j++){
            q.push(make_pair(circle1,circle2));
            int next = circle1 xor circle2;
            if(tmpm[next] > 0 && checked[make_pair(circle1,circle2)] == 0){
                circle1 = circle2;
                tmpm[next]--;
                circle2 = next;

            }else{
                ans = false;
                break;

                for(int j = 0; j < v.size(); j++){
                    checked[v[j]] == 1;
                }

            }
        }

        if(ans){
            if(circle1 xor circle2 == a[0]){
                break;
            }
        }

        v.clear();
    }

    if(ans){
        cout << "Yes" << endl;
    }else cout << "No" << endl;
    
    return 0;
}