import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); long n = Long.parseLong(br.readLine()); long x = n; int count = 0; for (long i = 2; i <= Math.sqrt(x) && count < 2; i++) { while(x % i == 0) { count++; x /= i; } } if (x != 1 && x != n) { count++; } if (count >= 2) { System.out.println("YES"); } else { System.out.println("NO"); } } }