require'prime' x=Prime.prime_division(n=gets.to_i)[0][0] puts"#{x} #{n/x}"