import sys
for line in sys.stdin:
    a, b = map(int, line.split())
    c = a * b
    while b:
        a, b = b, a % b
    print(str(a) + ' ' + str(c / a)) import sys sys for line in sys.stdin:
    a, b = map(int, line.split())
    c = a * b
    while b:
        a, b = b, a % b
    print(str(a) + ' ' + str(c / a)) 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 c = a * b c a * b a b while b:
        a, b = b, a % b
     b a, b = b, a % b a b b a % b a b print(str(a) + ' ' + str(c / a)) print str(a) + ' ' + str(c / a) str(a) + ' ' str(a) str a ' ' str(c / a) str c / a c a c = a * b a * b c a, b = b, a % b b a a, b = map(int, line.split()) map(int, line.split()) a b = map(int, line.split()) map(int, line.split()) b b = b, a % b a % b b
import sys
for line in sys.stdin:
    a, b = map(int, line.split())
    c = a * b
    while b:
        a, b = b, a % b
    print(str(a) + ' ' + str(c / a))