import math N = long(raw_input()) L =long(math.ceil(math.sqrt(N))) c = 0 for i in range(2,L + 1): if i * i > N:break while N % i == 0: N /= i c += 1 if N > 1:c += 1 print 'YES' if c >= 3 else 'NO'