from math import sqrt N = int(input()) cnt = 0 for i in range(2,int(sqrt(N)) + 1): if N == 1: break while N % i == 0: N //= i cnt += 1 if N != 1: cnt += 1 if cnt >= 3: print("YES") else: print("NO")