n = gets.chomp.to_i if(n == 1) puts "1 1" exit end (2..(n**0.5).to_i).each do |d| if((n/d.to_f - n/d).abs < 0.00000001) puts "#{d} #{n/d}" exit end end puts "1 #{n}"