import sys

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

for line in sys.stdin:
    a,b = map(int, line.split())
    if a<b:
        tem = a
        a = b
        b = tem
    gc = gcd(a,b)
    print(gc, a*b//gc) import sys sys def gcd(a,b):
    if a%b == 0:
        return b
    else:
        return gcd(b, a%b) gcd if a%b == 0:
        return b
    else:
        return gcd(b, a%b) a%b == 0 a%b a b 0 return b b return gcd(b, a%b) gcd(b, a%b) gcd b a%b a b a a b b for line in sys.stdin:
    a,b = map(int, line.split())
    if a<b:
        tem = a
        a = b
        b = tem
    gc = gcd(a,b)
    print(gc, a*b//gc) 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 if a<b:
        tem = a
        a = b
        b = tem
     a<b a b tem = a tem a a = b a b b = tem b tem gc = gcd(a,b) gc gcd(a,b) gcd a b print(gc, a*b//gc) print gc a*b//gc a*b a b gc def gcd(a,b):
    if a%b == 0:
        return b
    else:
        return gcd(b, a%b) def gcd(a,b):
    if a%b == 0:
        return b
    else:
        return gcd(b, a%b) gcd b = tem tem b a = b b a a,b = map(int, line.split()) map(int, line.split()) a gc = gcd(a,b) gcd(a,b) gc b = map(int, line.split()) map(int, line.split()) b tem = a a tem
import sys

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

for line in sys.stdin:
    a,b = map(int, line.split())
    if a<b:
        tem = a
        a = b
        b = tem
    gc = gcd(a,b)
    print(gc, a*b//gc)