t = int(input()) for n in map(int, input().split()): print('Yes' if n != 1 and n != 4 and n != 6 else 'No')