while data = gets
	data.chomp
	hai = data.split
	hai.collect! {|i|i.to_i}
	hai.sort.reverse!
	a = hai[0]
	b = hai[1]
	while (r = a % b) != 0 
		a = b
		b = r
	end
	
	
	print b, " ", hai[0] * hai[1] /b, "\n"
end