T = int(input()) def solve(): N = int(input()) print("Yes" if N in [1, 2, 4, 8, 16] else "No") for _ in range(T): solve()