require "prime" n = gets.to_s.to_i a = 1 b = 1 n.prime_division.each do |k, v| a *= k ** (v/2) b *= k ** (v%2) end puts "#{a} #{b}"