n = int(input())

cnt = 0
while n % 2 == 0:
    cnt += 1
    n //= 2

f = 3
while f * f <= n:
    while n % f == 0:
        cnt += 1
        n //= f
    f += 2

if n != 1:
    cnt += 1

if cnt >= 3:
    print("YES")
else:
    print("NO")