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



int main(){
    int N;
    cin >> N;
    // int *a = new int[N];
    vector<int> a(N, 0);
    for (int i = 0; i < N; i++){
        cin >> a[i];
    }
    for (int i = 0; i < N; i++){
        for (int j = i + 1; j < N; j++){
            int c = a[i] ^ a[j];
            auto itr = std::find(a.begin(), a.end(), c);
            if(itr == a.end()){
                cout << "No" << endl;
                exit(0);
            }
        }
    }
    cout << "Yes" << endl;