N = int(input()) def factors(x): f = [] while x % 2 == 0: f.append(2) x = x // 2 n=3 while x >= n * n: while x % n == 0: f.append(n) x = x // n n = n + 2 if x == 1: return f f.append(x) return f if len(factors(N)) >= 3: print('YES') else: print('NO')