import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long p = 0; long s = 0; long t = 0; for(long i = 2; (i * i) <= n; i++) { if((n % i) == 0) { p += 2; s = i; t = n / i; break; } } for(long i = 2; (i * i) <= s; i++) { if((s % i) == 0) { p += 2; break; } } for(long i = 2; (i * i) <= t; i++) { if((t % i) == 0) { p += 2; break; } } String ans = "NO"; if(p >= 3) ans = "YES"; System.out.println(ans); } }