import java.util.*; public class hate{ public static void main(String... args){ Scanner scan = new Scanner(System.in); long n = scan.nextLong(); System.out.println(judge(n)); } public static String judge(long n){ long N = n; int count = 0; for(long i = 2; i*i <= N; i++){ while(N%i==0){ N /= i; count++; } } if(N>1)count++; if(count>=3)return "YES"; return "NO"; } }