import bisect import math def mark(s, x): for i in range(x + x, len(s), x): s[i] = False def sieve(n): s = [True] * n for x in range(2, int(n**0.5) + 1): if s[x]: mark(s, x) return [i for i in range(n) if s[i] and i > 1] def solve(): N = int(input()) rtn = int(math.sqrt(N)) ps = sieve(rtn + 1) for p in ps: d, m = divmod(N, p) if m == 0: i = bisect.bisect_left(ps, d) if i >= len(ps) or ps[i] != d: return True return False def main(): print('YES' if solve() else 'NO') if __name__ == '__main__': main()