def koyakusu(a, b)
  loop do
    rem = b % a
    return a if rem == 0
    b, a = a, rem
  end
end

def kobaisu(a, b)
  (a*b)/koyakusu(a, b)
end

while str = gets
  a, b = str.split(' ').map(&:to_i).sort
  puts "#{koyakusu(a, b)} #{kobaisu(a, b)}"
end