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