import math N = int(input()) limit = int(math.sqrt(N)) div = [] n = N i = 2 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 == 2) : break if (cnt == 2) : print('YES') else : print('NO')