output_description: For each data set, print GCD and LCM separated by a single space in a line.
input_description: Input consists of several data sets. Each data set contains a and b separated
  by a single space in a line. The input terminates with EOF.
attempt: a, b = map(int, input().split())
  for i in range(1, a + 1):
      f = (b * i) % a
      lcm = b * i
      if f == 0:
          break
  for j in range(1, a + 1):
      if a % j == 0 and b % j == 0 and j * lcm == a * b:
          print(j, lcm)
  
problem_description: GCD and LCM
  
  Write a program which computes the greatest common divisor (GCD) and the least
  common multiple (LCM) of given a and b.
samples: [{"input": "6\n    50000000 30000000", "output": "24\n    10000000 150000000"}]