import sys

def to_i(e):
  return int(e)

def calc_gcd(a, b):
  if b > 0:
    return calc_gcd(b, a % b)
  else:
    return a

def calc_lcm(a, b):
  return ((a / calc_gcd(a, b)) * b)

while True:
  line = sys.stdin.readline()
  if not line: break
  a, b = map(to_i, line.rstrip().split(" "))
  gcd = calc_gcd(a, b)
  lcm = calc_lcm(a, b)
  print str(gcd) + " " + str(lcm) import sys sys def to_i(e):
  return int(e) to_i return int(e) int(e) int e e e def calc_gcd(a, b):
  if b > 0:
    return calc_gcd(b, a % b)
  else:
    return a calc_gcd if b > 0:
    return calc_gcd(b, a % b)
  else:
    return a b > 0 b 0 return calc_gcd(b, a % b) calc_gcd(b, a % b) calc_gcd b a % b a b return a a a a b b def calc_lcm(a, b):
  return ((a / calc_gcd(a, b)) * b) calc_lcm return ((a / calc_gcd(a, b)) * b) (a / calc_gcd(a, b)) * b a / calc_gcd(a, b) a calc_gcd(a, b) calc_gcd a b b a a b b while True:
  line = sys.stdin.readline()
  if not line: break
  a, b = map(to_i, line.rstrip().split(" "))
  gcd = calc_gcd(a, b)
  lcm = calc_lcm(a, b)
  print str(gcd) + " " + str(lcm) True line = sys.stdin.readline() line sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline if not line: break
   not line line a, b = map(to_i, line.rstrip().split(" ")) a map(to_i, line.rstrip().split(" ")) map to_i line.rstrip().split(" ") line.rstrip().split line.rstrip() line.rstrip line rstrip split " " b gcd = calc_gcd(a, b) gcd calc_gcd(a, b) calc_gcd a b lcm = calc_lcm(a, b) lcm calc_lcm(a, b) calc_lcm a b print str(gcd) + " " + str(lcm) str(gcd) + " " str(gcd) str gcd " " str(lcm) str lcm a, b = map(to_i, line.rstrip().split(" ")) map(to_i, line.rstrip().split(" ")) a lcm = calc_lcm(a, b) calc_lcm(a, b) lcm def calc_gcd(a, b):
  if b > 0:
    return calc_gcd(b, a % b)
  else:
    return a def calc_gcd(a, b):
  if b > 0:
    return calc_gcd(b, a % b)
  else:
    return a calc_gcd b = map(to_i, line.rstrip().split(" ")) map(to_i, line.rstrip().split(" ")) b def to_i(e):
  return int(e) def to_i(e):
  return int(e) to_i line = sys.stdin.readline() sys.stdin.readline() line def calc_lcm(a, b):
  return ((a / calc_gcd(a, b)) * b) def calc_lcm(a, b):
  return ((a / calc_gcd(a, b)) * b) calc_lcm gcd = calc_gcd(a, b) calc_gcd(a, b) gcd
import sys

def to_i(e):
  return int(e)

def calc_gcd(a, b):
  if b > 0:
    return calc_gcd(b, a % b)
  else:
    return a

def calc_lcm(a, b):
  return ((a / calc_gcd(a, b)) * b)

while True:
  line = sys.stdin.readline()
  if not line: break
  a, b = map(to_i, line.rstrip().split(" "))
  gcd = calc_gcd(a, b)
  lcm = calc_lcm(a, b)
  print str(gcd) + " " + str(lcm)