# coding: utf-8
import sys

def gcd(a, b):
    m = a % b
    if m == 0:
        return b
    return gcd(b, m)

for l in sys.stdin:
  x, y = map(int, l.split())
  g = gcd(x, y)
  l = x * y / g
  print g, l import sys sys def gcd(a, b):
    m = a % b
    if m == 0:
        return b
    return gcd(b, m) gcd m = a % b m a % b a b if m == 0:
        return b
     m == 0 m 0 return b b return gcd(b, m) gcd(b, m) gcd b m a a b b for l in sys.stdin:
  x, y = map(int, l.split())
  g = gcd(x, y)
  l = x * y / g
  print g, l l sys.stdin sys stdin x, y = map(int, l.split()) x map(int, l.split()) map int l.split() l.split l split y g = gcd(x, y) g gcd(x, y) gcd x y l = x * y / g l x * y / g x * y x y g print g l g = gcd(x, y) gcd(x, y) g def gcd(a, b):
    m = a % b
    if m == 0:
        return b
    return gcd(b, m) def gcd(a, b):
    m = a % b
    if m == 0:
        return b
    return gcd(b, m) gcd x, y = map(int, l.split()) map(int, l.split()) x y = map(int, l.split()) map(int, l.split()) y l = x * y / g x * y / g l
# coding: utf-8
import sys

def gcd(a, b):
    m = a % b
    if m == 0:
        return b
    return gcd(b, m)

for l in sys.stdin:
  x, y = map(int, l.split())
  g = gcd(x, y)
  l = x * y / g
  print g, l