Help me in solving PRB01 problem

My issue

My submission is showing as “wrong answer”. Where exactly is my code wrong? Help me find it please.

My code

for q in range(int(input())):
    n = int(input())
    count = 0
    for w in range(1, n+1):
        if n % w == 0:
            count += 1
    if count == 2:

Problem Link: PRB01 Problem - CodeChef

u have to print yes and no in lower cases like in sample test case.