N = long(raw_input()) i = 2 c = 0 while i * i <= N: while N % i == 0: N /= i c += 1 if c >= 3:break i += 1 if N > 1:c += 1 print 'YES' if c >= 3 else 'NO'