T = int(input()) for _ in range(T): N = int(input()) match N: case 1|2|4|8|16: print("Yes") case _: print("No")