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