import sys


def gcd(m, n):
  if n > m:
    m, n = n, m
  if n == 0:
    return m
  else:
    return gcd(n, m % n)


for line in sys.stdin:
  try:
    a, b = [int(i) for i in line.split()]
    g = gcd(a, b)
    l = a * b / g
    print("%d %d" % (g, l))
  except:
    break import sys sys def gcd(m, n):
  if n > m:
    m, n = n, m
  if n == 0:
    return m
  else:
    return gcd(n, m % n) gcd if n > m:
    m, n = n, m
   n > m n m m, n = n, m m n n m if n == 0:
    return m
  else:
    return gcd(n, m % n) n == 0 n 0 return m m return gcd(n, m % n) gcd(n, m % n) gcd n m % n m n m m n n for line in sys.stdin:
  try:
    a, b = [int(i) for i in line.split()]
    g = gcd(a, b)
    l = a * b / g
    print("%d %d" % (g, l))
  except:
    break line sys.stdin sys stdin try:
    a, b = [int(i) for i in line.split()]
    g = gcd(a, b)
    l = a * b / g
    print("%d %d" % (g, l))
  except:
    break except:
    break break int(i) for i in line.split() for i in line.split() i line.split() line.split line split for i in line.split() int(i) int i a, b = [int(i) for i in line.split()] a [int(i) for i in line.split()] b g = gcd(a, b) g gcd(a, b) gcd a b l = a * b / g l a * b / g a * b a b g print("%d %d" % (g, l)) print "%d %d" % (g, l) "%d %d" (g, l) g l def gcd(m, n):
  if n > m:
    m, n = n, m
  if n == 0:
    return m
  else:
    return gcd(n, m % n) def gcd(m, n):
  if n > m:
    m, n = n, m
  if n == 0:
    return m
  else:
    return gcd(n, m % n) gcd b = [int(i) for i in line.split()] [int(i) for i in line.split()] b a, b = [int(i) for i in line.split()] [int(i) for i in line.split()] a g = gcd(a, b) gcd(a, b) g l = a * b / g a * b / g l
import sys


def gcd(m, n):
  if n > m:
    m, n = n, m
  if n == 0:
    return m
  else:
    return gcd(n, m % n)


for line in sys.stdin:
  try:
    a, b = [int(i) for i in line.split()]
    g = gcd(a, b)
    l = a * b / g
    print("%d %d" % (g, l))
  except:
    break