import sys
def gcd(a,b):
    if b==0:return a
    return gcd(b,a%b)
def lcm(a,b):
    return a*b/gcd(a,b)
for i in sys.stdin.readlines():
    a,b=map(int,i.split())
    print "{} {}".format(gcd(a,b),lcm(a,b)) import sys sys def gcd(a,b):
    if b==0:return a
    return gcd(b,a%b) gcd if b==0:return a
     b==0 b 0 return gcd(b,a%b) gcd(b,a%b) gcd b a%b a 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 for i in sys.stdin.readlines():
    a,b=map(int,i.split())
    print "{} {}".format(gcd(a,b),lcm(a,b)) i sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines a,b=map(int,i.split()) a map(int,i.split()) map int i.split() i.split i split b print "{} {}".format(gcd(a,b),lcm(a,b)) "{} {}".format "{} {}" format gcd(a,b) gcd a b lcm(a,b) lcm a b b=map(int,i.split()) map(int,i.split()) b a,b=map(int,i.split()) map(int,i.split()) a def gcd(a,b):
    if b==0:return a
    return gcd(b,a%b) def gcd(a,b):
    if b==0:return a
    return gcd(b,a%b) gcd def lcm(a,b):
    return a*b/gcd(a,b) def lcm(a,b):
    return a*b/gcd(a,b) lcm
import sys
def gcd(a,b):
    if b==0:return a
    return gcd(b,a%b)
def lcm(a,b):
    return a*b/gcd(a,b)
for i in sys.stdin.readlines():
    a,b=map(int,i.split())
    print "{} {}".format(gcd(a,b),lcm(a,b))