fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); for i in 3..=1000000 { if n % i == 0 { println!("{}", i); break; } } }