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