use std::io::Read; fn main() { let mut buf = String::new(); std::io::stdin().read_to_string(&mut buf).unwrap(); let mut n: u64 = buf.trim().parse().unwrap(); let mut limit: u64 = (n as f64).powf(1./3.) as u64 + 1; let mut num: u64 = 2; let mut prime_count: usize = 0; while num <= limit && prime_count != 2 { if n % num == 0 { n /= num; limit = (n as f64).sqrt() as u64 + 1; prime_count += 1; } else { num += num%2 + 1; } } if prime_count == 2 && n > 1{ println!("YES"); } else { println!("NO") } }