from sys import stdin input = stdin.readline for _ in range(int(input())): N = int(input()) print("Yes" if N.bit_count() == 1 else "No")