R=range N=int(input()) m=2 M=10**6 for i in R(2): s=1 for p in R(m,M): if N%p==0: while N%p==0: N//=p m=p+1 s=0 break if N==1 or s==1: print("Yes") exit(0) print("No")