require "prime" X = gets.to_i A = Prime.prime_division(X).map{|pe| [pe[0], pe[1]/2*2]}.map{|pe| pe.inject(:**)}.reduce(:*) B = X / (A * A) puts "#{A} #{B}"