import java.io.*; import java.util.Arrays; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; boolean[] p; while((line=br.readLine())!=null){ long n=Long.parseLong(line); p=new boolean[(int)Math.sqrt(n)+1]; Arrays.fill(p,true); p[0]=false; p[1]=false; for(int i=2;i<=Math.sqrt(Math.sqrt(n));i++){ if(p[i]){ for(int j=i+i;j<=Math.sqrt(n);j+=i){ p[j]=false; } } } String ans="NO"; int cnt=0; for(int i=2;i