import sys

def gcd(a, b):
    "?????§??¬?´???°????±???????"
    if a < b:
        c = a
        a = b
        b = c
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

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

for line in sys.stdin:
    a, b = map(int, line.split())
    print("%d %d" % (gcd(a, b), lcm(a, b))) import sys sys def gcd(a, b):
    "?????§??¬?´???°????±???????"
    if a < b:
        c = a
        a = b
        b = c
    if b == 0:
        return a
    else:
        return gcd(b, a % b) gcd "?????§??¬?´???°????±???????" if a < b:
        c = a
        a = b
        b = c
     a < b a b c = a c a a = b a b b = c b c if b == 0:
        return a
    else:
        return gcd(b, a % b) b == 0 b 0 return a a return gcd(b, a % b) gcd(b, a % b) gcd b a % b a b a a b b def lcm(a, b):
    g = gcd(a, b)
    return g * (a // g) * (b // g) lcm g = gcd(a, b) g gcd(a, b) gcd a b return g * (a // g) * (b // g) g * (a // g) * (b // g) g * (a // g) g a // g a g b // g b g a a b b for line in sys.stdin:
    a, b = map(int, line.split())
    print("%d %d" % (gcd(a, b), lcm(a, b))) line sys.stdin sys stdin a, b = map(int, line.split()) a map(int, line.split()) map int line.split() line.split line split b print("%d %d" % (gcd(a, b), lcm(a, 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):
    "?????§??¬?´???°????±???????"
    if a < b:
        c = a
        a = b
        b = c
    if b == 0:
        return a
    else:
        return gcd(b, a % b) def gcd(a, b):
    "?????§??¬?´???°????±???????"
    if a < b:
        c = a
        a = b
        b = c
    if b == 0:
        return a
    else:
        return gcd(b, a % b) gcd def lcm(a, b):
    g = gcd(a, b)
    return g * (a // g) * (b // g) def lcm(a, b):
    g = gcd(a, b)
    return g * (a // g) * (b // g) lcm b = map(int, line.split()) map(int, line.split()) b a, b = map(int, line.split()) map(int, line.split()) a
import sys

def gcd(a, b):
    "?????§??¬?´???°????±???????"
    if a < b:
        c = a
        a = b
        b = c
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

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

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