input() for n in map(int,input().split()): print(["Yes","No"][n in[1,4,6]])