import sys
def g(a,b):
    if b==0: return a
    return g(b,a%b)
for l in sys.stdin:
    a,b=map(int,l.split())
    c=g(a,b)
    print c,a/c*b import sys sys def g(a,b):
    if b==0: return a
    return g(b,a%b) g if b==0: return a
     b==0 b 0 return g(b,a%b) g(b,a%b) g b a%b a b a a b b for l in sys.stdin:
    a,b=map(int,l.split())
    c=g(a,b)
    print c,a/c*b l sys.stdin sys stdin a,b=map(int,l.split()) a map(int,l.split()) map int l.split() l.split l split b c=g(a,b) c g(a,b) g a b print c a/c*b a/c a c b def g(a,b):
    if b==0: return a
    return g(b,a%b) def g(a,b):
    if b==0: return a
    return g(b,a%b) g a,b=map(int,l.split()) map(int,l.split()) a c=g(a,b) g(a,b) c b=map(int,l.split()) map(int,l.split()) b
import sys
def g(a,b):
    if b==0: return a
    return g(b,a%b)
for l in sys.stdin:
    a,b=map(int,l.split())
    c=g(a,b)
    print c,a/c*b