#!/usr/bin/python
import sys

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

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

for l in sys.stdin:
    a = [int(s) for s in l.split()]
    print str(gcd(a[0],a[1]))+" "+str(lcm(a[0],a[1])) 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 def lcm(a,b):
    return a / gcd(a,b) * b lcm return a / gcd(a,b) * b a / gcd(a,b) * b a / gcd(a,b) a gcd(a,b) gcd a b b a a b b for l in sys.stdin:
    a = [int(s) for s in l.split()]
    print str(gcd(a[0],a[1]))+" "+str(lcm(a[0],a[1])) l sys.stdin sys stdin int(s) for s in l.split() for s in l.split() s l.split() l.split l split for s in l.split() int(s) int s a = [int(s) for s in l.split()] a [int(s) for s in l.split()] print str(gcd(a[0],a[1]))+" "+str(lcm(a[0],a[1])) str(gcd(a[0],a[1]))+" " str(gcd(a[0],a[1])) str gcd(a[0],a[1]) gcd a[0] a 0 a[1] a 1 " " str(lcm(a[0],a[1])) str lcm(a[0],a[1]) lcm a[0] a 0 a[1] a 1 def lcm(a,b):
    return a / gcd(a,b) * b def lcm(a,b):
    return a / gcd(a,b) * b lcm a = [int(s) for s in l.split()] [int(s) for s in l.split()] a 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
#!/usr/bin/python
import sys

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

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

for l in sys.stdin:
    a = [int(s) for s in l.split()]
    print str(gcd(a[0],a[1]))+" "+str(lcm(a[0],a[1]))