#include using namespace std; using ull = unsigned long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, nn; cin >> n; nn = 1 << n; vector a(nn); for(auto &e : a) cin >> e; for(int i = 0; i < nn; i++){ for(int j = 0; ; j=(j-1)&i){ if(a[i] ^ a[j] ^ a[i^j]){ cout << "No" << '\n'; return 0; } } } cout << "Yes" << '\n'; }