def gcd(a, b)
  while (b != 0) do
    r = a % b;
    a = b;
    b = r;
  end

  return a;
end

until $stdin.eof?
  a, b = gets.split(' ').map(&:to_i)
  gcd = gcd(a, b)
  lcm = (a*b)/gcd
  puts "#{gcd} #{lcm}"
end