import strutils, math proc nextString: string = result = "" while not endOfFile stdin: let nextChar = readChar stdin case nextChar of '\r': discard of "\n"[0], ' ': break else: add result, nextChar proc nextInt64: int64 = return parseBiggestInt nextString() proc judge(n: int64): bool = for i in 2 ..< int64.high: if i ^ 2 > n: return if n mod i == 0: return true proc main: void = let n = nextInt64() writeLine stdout, ["NO", "YES"][int judge n] when isMainModule: main()