from sys import stdin, stdout input = lambda: stdin.readline() write = stdout.write def primes235(limit): yield 2; yield 3; yield 5 if limit < 7: return modPrms = [7,11,13,17,19,23,29,31] gaps = [4,2,4,2,4,6,2,6,4,2,4,2,4,6,2,6] ndxs = [0,0,0,0,1,1,2,2,2,2,3,3,4,4,4,4,5,5,5,5,5,5,6,6,7,7,7,7,7,7] lmtbf = (limit + 23) // 30 * 8 - 1 lmtsqrt = (int(limit ** 0.5) - 7) lmtsqrt = lmtsqrt // 30 * 8 + ndxs[lmtsqrt % 30] buf = [True] * (lmtbf + 1) for i in range(lmtsqrt + 1): if buf[i]: ci = i & 7; p = 30 * (i >> 3) + modPrms[ci] s = p * p - 7; p8 = p << 3 for j in range(8): c = s // 30 * 8 + ndxs[s % 30] buf[c::p8] = [False] * ((lmtbf - c) // p8 + 1) s += p * gaps[ci]; ci += 1 for i in range(lmtbf - 6 + (ndxs[(limit - 7) % 30])): if buf[i]: yield (30 * (i >> 3) + modPrms[i & 7]) def main(): N = int(input()) if N == 1: write('NO\n') return n = N // 2 prime_list = [] for i in primes235(n): prime_list.append(i) for i in prime_list: j = 2 while 1: n = i * j if n > N: break if not N % n: write('YES\n') return j += 1 write('NO\n') main()