N = int(input())
flag = False
if N <= 2:
print('no')
for j in range(2, int(N**0.5)+1):
if N%j == 0:
flag = True
if flag == False:
print('yes')
else:
print('no')
The logic is same everywhere I saw the solution, but somehow codechef shows that it is a wrong answer, as I don't have a pro subscription of codechef, I cannot see the failed cases.