#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<long long> A(1 << N); for (int i = 0; i < (1 << N); i++) { cin >> A[i]; } long long g = 0; for (int i = 0; i < (1 << N); i++){ g ^= A[i]; } if (A[0] == 0 and g == 0){ cout << "Yes" << endl; } else { cout << "No" << endl; } }