fn main() { let mut m = String::new(); std::io::stdin().read_line(&mut m).ok(); let m: u64 = m.trim().parse().unwrap(); for i in 2.. { if i * i > m { break; } if m % i == 0 { println!("{} {}", i, m / i); return; } } println!("1 {}", m); }