def solve(a, b):
  if a % b == 0:
    return b
  else:
    return solve(b, a % b)
  
while True:
  try:
    a, b = map(int, input().split())
    lcm = solve(a,b)
    print(lcm, a * b // lcm)

  except:
    break
  def solve(a, b):
  if a % b == 0:
    return b
  else:
    return solve(b, a % b)
   solve if a % b == 0:
    return b
  else:
    return solve(b, a % b)
   a % b == 0 a % b a b 0 return b b return solve(b, a % b) solve(b, a % b) solve b a % b a b a a b b while True:
  try:
    a, b = map(int, input().split())
    lcm = solve(a,b)
    print(lcm, a * b // lcm)

  except:
    break
  True try:
    a, b = map(int, input().split())
    lcm = solve(a,b)
    print(lcm, a * b // lcm)

  except:
    break
  except:
    break
  break a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b lcm = solve(a,b) lcm solve(a,b) solve a b print(lcm, a * b // lcm) print lcm a * b // lcm a * b a b lcm def solve(a, b):
  if a % b == 0:
    return b
  else:
    return solve(b, a % b)
   def solve(a, b):
  if a % b == 0:
    return b
  else:
    return solve(b, a % b)
   solve b = map(int, input().split()) map(int, input().split()) b lcm = solve(a,b) solve(a,b) lcm a, b = map(int, input().split()) map(int, input().split()) a
def solve(a, b):
  if a % b == 0:
    return b
  else:
    return solve(b, a % b)
  
while True:
  try:
    a, b = map(int, input().split())
    lcm = solve(a,b)
    print(lcm, a * b // lcm)

  except:
    break
 
