import math n = int(input()) sq = math.ceil(math.sqrt(n)) cnt = 0 d = 2 while n > 1 and d <= sq: if n % d == 0: cnt += 1 if cnt >= 3: break n //= d else: d += 1 res = 'NO' if cnt >= 3: res = 'YES' print(res)