import math N = int(input()) div = [] n = N i = 2 limit = math.sqrt(N) if (n == 1 or n == 2) : print('NO') else : cnt = 0 while(True) : if (n % i == 0) : print(i) n //= i cnt += 1 else : i += 1 if (i >= limit or cnt == 3) : break if (cnt >= 3) : print('YES') else : print('NO')