MAX=10**6 prime=[True for i in range(MAX+1)] prime[0]=prime[1]=False for i in range(2,MAX+1): if not prime[i]: continue for j in range(2,MAX//i+1): prime[i*j]=False N=int(input()) for i,p in enumerate(prime): if p: if N%i==0: while N%i==0: N//=i break for i,p in enumerate(prime): if p: if N%i==0: while N%i==0: N//=i break if N==1: print('Yes') else: print('No')