n=int(input()) first=True d=2 while 1: if n%d==0: if first: n//=d d=1 first=False else: print("YES") exit() d+=1 if d**2>n:break print("NO")