R=range I=input for t in R(int(I())):N=int(I());print("YNeos"[not N in[1,2,4,8,16]::2])