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