t=int(input()) A=list(map(int,input().split())) for a in A: print('No' if a in (1,4,6) else 'Yes')