package yukicoder; import java.util.Scanner; public class No3023 { public static void main(String[] args) { int n = new Scanner(System.in).nextInt(); int rootN = (int)Math.pow(n, 0.5); boolean res = false; for(int i = 2; i <= rootN; i++) { if(n % i == 0) { res = true; break; } } if(n == 1) { System.out.println("NO"); return; } System.out.println(res ? "NO" : "YES"); } }