import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long N = sc.nextLong(); int divisorCount = 0; for(long i=2; i<=Math.pow(N, 0.5); i++){ if(N%i == 0){ divisorCount++; } if(divisorCount==2){ System.out.println("YES"); System.exit(1); } } System.out.println("No"); } }