import java.io.*; import java.util.*; class Main { public static void out (Object o) { System.out.println(o); } public static boolean isPrime (long n) { if (n == 1 || (n != 2 && n % 2 == 0)) return false; for (int i = 3; i * i <= n; i += 2) if (n % i == 0) return false; return true; } public static boolean solve (long n) { if (n == 1) return false; for (long i = 2; i * i <= n; i++) { //if (i % 1000000 == 0) out(i); if (n % i != 0) continue; if (!isPrime(i) || !isPrime(n / i)) return true; } return false; } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); out(solve(Long.parseLong(br.readLine())) ? "YES" : "NO"); } }