use std::io::Read; fn is_prime(n: u64) -> bool { let mut m = 2; while m * m <= n { if n % m == 0 { return false; } m += 1; } true } fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: u64 = itr.next().unwrap().parse().unwrap(); let mut m = 2u64; let mut div = Vec::new(); while m * m <= n { if n % m == 0 { div.push(m); if n / m != m { div.push(n / m); } } m += 1; } for a in div { if !is_prime(a) { println!("YES"); return; } } println!("NO"); }