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 == 0) puts "#{d} #{n/d}" exit end end puts "1 #{n}"