N = int(input()) if N == 1: print("NO") exit() def isp(x): for i in range(2, int(x ** 0.5) + 1): if x % i == 0: return False return True if isp(N): print("NO") exit() for i in range(2, int(N ** 0.5) + 1): if N % i == 0: N //= i print(i) break if isp(N): print("NO") exit() for i in range(2, int(N ** 0.5) + 1): if N % i == 0: print(i) N //= i break if N == 1: print("NO") else: print("YES")