import sys

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

for line in sys.stdin:
    a, b= map(int, line.split())
    if a < b:
        a, b = b, a
    g = gcd(a,b)
    print g, a*b/g 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 for line in sys.stdin:
    a, b= map(int, line.split())
    if a < b:
        a, b = b, a
    g = gcd(a,b)
    print g, a*b/g 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:
        a, b = b, a
     a < b a b a, b = b, a a b b a g = gcd(a,b) g gcd(a,b) gcd a b print g a*b/g a*b a b g g = gcd(a,b) gcd(a,b) g b= map(int, line.split()) map(int, line.split()) b a, b = b, a b a b = b, a a 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 a, b= map(int, line.split()) map(int, 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= map(int, line.split())
    if a < b:
        a, b = b, a
    g = gcd(a,b)
    print g, a*b/g