I=input T=I() for N in map(int,I().split()):print("YNeos"[N in[1,4,6]::2])