n = int(input()) plist = [2] + [ i for i in range(3,int(n**0.5)+2,2) ] if n < 7: print("NO") else: q = 0 clist = [] for i in plist: if n % i == 0: clist.append(i) n //= i if n % i == 0: print("YES") q = 1 break elif len(clist) == 3: print("YES") q = 1 break if q == 0: print("NO")