n = int(input()) t = list(map(int, input().split())) for i in t: if i == 1 or i == 4 or i == 6: print("No") else: print("Yes")