from sys import stdin input = stdin.readline for _ in range(int(input())): N = int(input()) print("Yes" if N in [1, 2, 4, 8, 16] else "No")