import java.util.*; import java.math.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long nn = n; ArrayList list = new ArrayList(); long tmp = (long)Math.sqrt(n); for(int i = 2; i <= tmp; i++) { while(n % i == 0) { list.add(i); n /= i; } } if(list.size() > 2 || list.size() == 2 && n != 1) System.out.println("YES"); else System.out.println("NO"); } }