import sys 
for e in sys.stdin:
    a, b = map(int, e.split())
    p = a * b
    while b:
        a, b = b, a%b
        pass
    print (a,p//a) import sys sys for e in sys.stdin:
    a, b = map(int, e.split())
    p = a * b
    while b:
        a, b = b, a%b
        pass
    print (a,p//a) e sys.stdin sys stdin a, b = map(int, e.split()) a map(int, e.split()) map int e.split() e.split e split b p = a * b p a * b a b while b:
        a, b = b, a%b
        pass
     b a, b = b, a%b a b b a%b a b print (a,p//a) print a p//a p a b = map(int, e.split()) map(int, e.split()) b a, b = map(int, e.split()) map(int, e.split()) a a, b = b, a%b b a p = a * b a * b p b = b, a%b a%b b
import sys 
for e in sys.stdin:
    a, b = map(int, e.split())
    p = a * b
    while b:
        a, b = b, a%b
        pass
    print (a,p//a)
