import sys

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

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

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

for line in sys.stdin:
    (a,b)=line.split(" ")
    a=eval(a)
    b=eval(b)
    g=gcd(a,b)
    print("%d %d" % (g,a*b/g))