import sequtils,strutils,strscans,algorithm,math,future,macros template get*():string = stdin.readLine() proc getIsPrimes(n:int) :seq[bool] = # [0...n] result = newSeqWith(n+1,true) result[0] = false result[1] = false for i in 2..n.float.sqrt.int : if not result[i]: continue for j in countup(i*2,n,i): result[j] = false proc getPrimes(n:int):seq[int] = # [2,3,5,...n] let isPrimes = getIsPrimes(n) result = @[] for i,p in isPrimes: if p : result &= i proc getIsPrime(n:int) : bool = # O(N/2) let primes = getPrimes(n.float.sqrt.int + 1) for p in primes: if n mod p == 0 and n != p: return false return true let N = get().parseInt() if N == 1 or getIsPrime(N): echo "NO" else: echo "YES"