n=gets.to_i b=1e100 a=1e100 (1..100000).each do |x| next unless n%(x*x) == 0 a = x b = n/(x*x) end puts [a,b]*' '