import sys input = sys.stdin.readline A=[1,4,6] T=int(input()) X=list(map(int,input().split())) for tests in range(T): n=X[tests] if n in A: print("No") else: print("Yes")