#[allow(dead_code)] #[allow(unused_imports)] fn read() -> T { use std::io::*; let stdin = stdin(); let stdin = stdin.lock(); let token: String = stdin .bytes() .map(|c| c.expect("failed to read char") as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect(); token.parse().ok().expect("failed to parse token") } fn factrise(_n:i64) -> Vec<(i64,i64)> { let mut n = _n; let mut i = 2; let mut res = Vec::new(); while i * i <= n { let mut ex = 0; while n % i == 0{ ex += 1; n /= i; } res.push((i,ex)); i += 1; } if n != 1 { res.push((n,1)); } res } fn main(){ let n:i64 = read(); let res = factrise(n); let mut a = 1; let mut div = 1; for (f,ex) in res { let mut tmp = 1; for i in 0..ex/2*2 { if i % 2 == 0 { a *= f; } tmp *= f; } div *= tmp; } println!("{} {}",a,n / div); }