import sys
def gcm(a,b):
    x=gcm(b,a%b) if b else a
    return x
for s in sys.stdin:
    a,b=map(int,s.split())
    c=gcm(a,b)
    print c,a/c*b import sys sys def gcm(a,b):
    x=gcm(b,a%b) if b else a
    return x gcm x=gcm(b,a%b) if b else a x gcm(b,a%b) if b else a b gcm(b,a%b) gcm b a%b a b a return x x a a b b for s in sys.stdin:
    a,b=map(int,s.split())
    c=gcm(a,b)
    print c,a/c*b s sys.stdin sys stdin a,b=map(int,s.split()) a map(int,s.split()) map int s.split() s.split s split b c=gcm(a,b) c gcm(a,b) gcm a b print c a/c*b a/c a c b def gcm(a,b):
    x=gcm(b,a%b) if b else a
    return x def gcm(a,b):
    x=gcm(b,a%b) if b else a
    return x gcm c=gcm(a,b) gcm(a,b) c b=map(int,s.split()) map(int,s.split()) b a,b=map(int,s.split()) map(int,s.split()) a
import sys
def gcm(a,b):
    x=gcm(b,a%b) if b else a
    return x
for s in sys.stdin:
    a,b=map(int,s.split())
    c=gcm(a,b)
    print c,a/c*b