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