import sys
for l in sys.stdin:
  a,b = map(int, l.split())
  x,y = (a,b) if a > b else (b,a)
  while x%y:
    m = x % y
    x,y = y,m
  print "%d %d" % (y, a*b/y) import sys sys for l in sys.stdin:
  a,b = map(int, l.split())
  x,y = (a,b) if a > b else (b,a)
  while x%y:
    m = x % y
    x,y = y,m
  print "%d %d" % (y, a*b/y) l sys.stdin sys stdin a,b = map(int, l.split()) a map(int, l.split()) map int l.split() l.split l split b x,y = (a,b) if a > b else (b,a) x (a,b) if a > b else (b,a) a > b a b (a,b) a b (b,a) b a y while x%y:
    m = x % y
    x,y = y,m
   x%y x y m = x % y m x % y x y x,y = y,m x y y m print "%d %d" % (y, a*b/y) "%d %d" (y, a*b/y) y a*b/y a*b a b y x,y = (a,b) if a > b else (b,a) (a,b) if a > b else (b,a) x m = x % y x % y m b = map(int, l.split()) map(int, l.split()) b y = (a,b) if a > b else (b,a) (a,b) if a > b else (b,a) y x,y = y,m y x a,b = map(int, l.split()) map(int, l.split()) a y = y,m m y
import sys
for l in sys.stdin:
  a,b = map(int, l.split())
  x,y = (a,b) if a > b else (b,a)
  while x%y:
    m = x % y
    x,y = y,m
  print "%d %d" % (y, a*b/y)