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