M=gets.to_i
i=2
while i*i<=M
    if M%i==0
        puts "#{i} #{M/i}"
        exit
    end
    i+=1
end
puts "1 #{M}"