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