use std::io::*; use std::str::FromStr; use utils::*; pub fn main() { let i = stdin(); let mut o = Vec::new(); run(i.lock(), &mut o); stdout().write_all(&o).unwrap(); } fn run(i: R, o: &mut W) { let mut i = CpReader::new(i); let n = i.read::(); let r = if solve(n) { "YES" } else { "NO" }; writeln!(o, "{}", r).unwrap(); } fn solve(n: usize) -> bool { let mut np = vec![false; (n as f64).sqrt() as usize + 1]; let mut ps = Vec::new(); for i in 2..np.len() { if !np[i] { let mut j = i * 2; while j < np.len() { np[j] = true; j += i; } ps.push(i); } } for &p in &ps { if n % p == 0 { let nd = n / p; for &p in &ps { if nd % p == 0 && nd / p > 1 { return true; } } } } false } mod utils { use super::*; pub struct CpReader { r: R, s: String, } impl CpReader { pub fn new(r: R) -> Self { CpReader { r: r, s: String::new(), } } pub fn read_line(&mut self) -> &str { self.s.clear(); self.r.read_line(&mut self.s).unwrap(); self.s.trim() } pub fn read(&mut self) -> T { self.read_line().parse().ok().unwrap() } } }