import math N = int(input()) if N == 1: exit(print("NO")) def make_divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] def is_prime(n): sqrt_n = math.ceil(math.sqrt(n)) for i in range(2, sqrt_n + 1): if n % i == 0: return False return True yakusu = make_divisors(N) yakusu.pop(0) yakusu.pop(-1) for y in yakusu: if not is_prime(y): print("YES") exit() print("NO")