def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

while True:
    try:
        a,b = map(int, raw_input().split())
        c = gcd(a, b)
        print "{0} {1}".format(c, a*b/c)
    except:
        break def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a gcd while b > 0:
        a, b = b, a%b
     b > 0 b 0 a, b = b, a%b a b b a%b a b return a a a a b b while True:
    try:
        a,b = map(int, raw_input().split())
        c = gcd(a, b)
        print "{0} {1}".format(c, a*b/c)
    except:
        break True try:
        a,b = map(int, raw_input().split())
        c = gcd(a, b)
        print "{0} {1}".format(c, a*b/c)
    except:
        break except:
        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 c = gcd(a, b) c gcd(a, b) gcd a b print "{0} {1}".format(c, a*b/c) "{0} {1}".format "{0} {1}" format c a*b/c a*b a b c a,b = map(int, raw_input().split()) map(int, raw_input().split()) a b = map(int, raw_input().split()) map(int, raw_input().split()) b c = gcd(a, b) gcd(a, b) c def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a gcd
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

while True:
    try:
        a,b = map(int, raw_input().split())
        c = gcd(a, b)
        print "{0} {1}".format(c, a*b/c)
    except:
        break