EPS/2024/04/15-04-24/d.py

17 lines
286 B
Python
Raw Normal View History

2024-04-29 13:33:02 +02:00
from math import sqrt
N=int(input())
def premier(x):
for i in range(2,int(sqrt(x))+1):
if x%i==0:
return False
return True
if premier(N):
print('N')
else:
k=sqrt(N)
if int(k)**2==N and premier(k):
print('N')
else:
print('Y')