require 'prime' m = gets.to_i n = Prime.prime_division(m)[0][0] printf("%d %d",n,m/n)