M = N = int(input()) C, I = 0, 2 while I ** 2 <= M: while N % I == 0: C += 1; N /= I I += 1 print(["YES", "NO"][C + (N != 1) < 3])