import java.util.Scanner; public class yuki36 { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); long N = sc.nextLong(); boolean flag = true; int divisorCount = 0; for(long i=2; i*i<=N; i++){ /*if(N%i == 0){ divisorCount++; }*/ for(int j=1; Math.pow(i,j)<=N; j++){ if(N%Math.pow(i,j)==0){ divisorCount++; if(divisorCount==2){ break; } } else{ break; } } if(divisorCount==2){ System.out.println("YES"); flag = false; break; } } if(flag) System.out.println("NO"); } }