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; for(long i = 2; i < Math.sqrt(n); i++){ if(N%i==0){ N /= i; } } if(N>1)return "YES"; return "NO"; } }