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