本蒟蒻只会打表
for _ in range(int(input())): print("Yes" if int(input()) not in {2,3,5,6,8,11,14} else "No")