import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); boolean[] isNotPrime = new boolean[10000001]; for (int i = 2; i <= isNotPrime.length && i <= Math.sqrt(n); i++) { if (isNotPrime[i]) { if (n % i == 0) { System.out.println("YES"); return; } } else { for (int j = 2; j * i < isNotPrime.length; j++) { isNotPrime[i * j] = true; } } } System.out.print("NO"); } }