def gcd(a, b)
  if b == 0 then
    a
  else
    gcd b, a % b
  end
end

while str = gets do
  arr = str.split(nil).map{|s| s.to_i }
  g = gcd arr[0], arr[1]
  l = arr[0] * arr[1] / g

  print g, " ", l, "\n"
end