import sys

def gcd(a, b):
    return gcd(b, a % b) if a % b else b

def lcm(a, b):
    return a * b / gcd(a, b)

for line in sys.stdin:
    data = map(int, line.split())
    a, b = data
    print "%d %d" % (gcd(a, b), lcm(a, b)) import sys sys def gcd(a, b):
    return gcd(b, a % b) if a % b else b gcd return gcd(b, a % b) if a % b else b gcd(b, a % b) if a % b else b a % b a b gcd(b, a % b) gcd b a % b a b b a a b b def lcm(a, b):
    return a * b / gcd(a, b) lcm return a * b / gcd(a, b) a * b / gcd(a, b) a * b a b gcd(a, b) gcd a b a a b b for line in sys.stdin:
    data = map(int, line.split())
    a, b = data
    print "%d %d" % (gcd(a, b), lcm(a, b)) line sys.stdin sys stdin data = map(int, line.split()) data map(int, line.split()) map int line.split() line.split line split a, b = data a data b print "%d %d" % (gcd(a, b), lcm(a, b)) "%d %d" (gcd(a, b), lcm(a, b)) gcd(a, b) gcd a b lcm(a, b) lcm a b def gcd(a, b):
    return gcd(b, a % b) if a % b else b def gcd(a, b):
    return gcd(b, a % b) if a % b else b gcd a, b = data data a data = map(int, line.split()) map(int, line.split()) data b = data data b def lcm(a, b):
    return a * b / gcd(a, b) def lcm(a, b):
    return a * b / gcd(a, b) lcm
import sys

def gcd(a, b):
    return gcd(b, a % b) if a % b else b

def lcm(a, b):
    return a * b / gcd(a, b)

for line in sys.stdin:
    data = map(int, line.split())
    a, b = data
    print "%d %d" % (gcd(a, b), lcm(a, b))