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

while True :
    try:
        a,b = map(int,raw_input().split())
        a,b = max(a,b), min(a,b)
        print "%d" % gcd(a,b),
        print "%d" % lcm(a,b)
    except EOFError:
        break def gcd(a,b):
    while a%b :
        a,b=b,a%b
    return b gcd while a%b :
        a,b=b,a%b
     a%b a b a,b=b,a%b a b b a%b a b return 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 while True :
    try:
        a,b = map(int,raw_input().split())
        a,b = max(a,b), min(a,b)
        print "%d" % gcd(a,b),
        print "%d" % lcm(a,b)
    except EOFError:
        break True try:
        a,b = map(int,raw_input().split())
        a,b = max(a,b), min(a,b)
        print "%d" % gcd(a,b),
        print "%d" % lcm(a,b)
    except EOFError:
        break except EOFError:
        break break a,b = map(int,raw_input().split()) a map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split b a,b = max(a,b), min(a,b) a max(a,b) max a b b min(a,b) min a b print "%d" % gcd(a,b) "%d" gcd(a,b) gcd a b print "%d" % lcm(a,b) "%d" lcm(a,b) lcm a b def lcm(a,b):
    return a*b/gcd(a,b) def lcm(a,b):
    return a*b/gcd(a,b) lcm a,b = map(int,raw_input().split()) map(int,raw_input().split()) a b = max(a,b), min(a,b) min(a,b) b b = map(int,raw_input().split()) map(int,raw_input().split()) b a,b = max(a,b), min(a,b) max(a,b) a def gcd(a,b):
    while a%b :
        a,b=b,a%b
    return b def gcd(a,b):
    while a%b :
        a,b=b,a%b
    return b gcd

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

while True :
    try:
        a,b = map(int,raw_input().split())
        a,b = max(a,b), min(a,b)
        print "%d" % gcd(a,b),
        print "%d" % lcm(a,b)
    except EOFError:
        break