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