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