N = input() cnt = 0 while i * i <= N: while (N % i == 0): cnt += 1 N /= i if (N != 1): cnt += 1 print "YES" if cnt > 2 else "NO"