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