#include<iostream>
#include<sstream>
#include<bitset>
#include<vector>
#include<algorithm>
using namespace std;

string bitplus(string a, string b){
    string ans("00000000000000000000000000000000");
    for(int i = 0 ; i < 32 ; i++){
        if((a[i] == '1' && b[i] == '1') || (a[i] == '0' && b[i] == '0') ){
            ans[i] = '0';
        }else{
            ans[i] = '1';
        }
    }
    return ans;
}

int main(){
    int n;
    cin >> n;
    vector <string> a(n);
    string ans = "Yes";
    int in;a
    stringstream ins;
    for(int i = 0 ; i < n ; i++){
        cin >> in;
        stringstream ins;
        ins << bitset<32>(in);
        a[i] = ins.str();
    }

    for(int i = 0 ; i < n-1 ;i++){
        bool flag = true;
        for(int j = i+1; j < n; j++){
            string ab = bitplus(a[i],a[j]);
            vector <string>::iterator is;
            is = find(a.begin(),a.end(),ab);

            if(is != a.end()){
                flag = false;
                break;
            }
        }
        if(flag){
            ans = "No";
            break;
        }
    }

    cout << ans << endl;

    return 0;
}