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 let N = get().parseInt() primes = getPrimes(N.float.sqrt.int + 1) if N == 1 : echo "NO" quit() for p1 in primes: if N mod p1 != 0: continue let factor = N div p1 for p2 in primes: if factor mod p2 != 0: continue if factor == p2 : echo "NO" else: echo "YES" quit() echo "NO" quit() echo "NO"