import math def sieve(n): p=[True for i in range(n+1)] p[0]=p[1]=False end=int(n**0.5) for i in range(2,end+1): if p[i]: for j in range(i*i,n+1,i): p[j]=False return p p=sieve(10**7+10) out="NO" n=int(input()) for i in range(2,int(math.sqrt(n))+1): if n%i==0 and p[i]==0: out="YES" break print(out)