import java.util.*; import java.math.*; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); long i = sc.nextLong(); BigInteger bi = BigInteger.valueOf(i); System.out.println((i == 1 || bi.isProbablePrime(20)) ? "NO" : "YES"); }}