def calc_gcd(a, b) 
  if b > 0 then
    calc_gcd(b,a % b) 
  else
    a
  end
end

def calc_lcm(a, b)
  (a / calc_gcd(a, b)) * b
end

while line = STDIN.gets
  line.chomp!
  arr = line.split(" ")
  gcd = calc_gcd(arr[0].to_i, arr[1].to_i)
  lcm = calc_lcm(arr[0].to_i, arr[1].to_i)
  puts "#{gcd} #{lcm}" 
end