N = int(input()) count = 0 while N % 2 == 0: count += 1 N //= 2 F = 3 while F * F <= N: while N % F == 0: count += 1 N //= F F += 2 if N != 1: count += 1 if count >= 3: print("YES") else: print("NO")