n = int(input()) a = [int(input()) for _ in range(1 << n)] for i in range(1 << n): v = 0 for j in range(n): if i & (1 << j): v ^= a[1 << j] if v != a[i]: print('No') break else: print('Yes')