T = int(input()) Ns = [int(s) for s in input().split()] for N in Ns: if N in (1, 4, 6): print("No") else: print("Yes")