import sys
def gcm(a,b):
    if a<b: a,b=b,a
    if (a%b==0): return b
    return gcm(b,a%b)

for s in sys.stdin:
    a,b=map(int,s.split())
    c=gcm(a,b)
    print "%d %d" %(c,a/c*b) import sys sys def gcm(a,b):
    if a<b: a,b=b,a
    if (a%b==0): return b
    return gcm(b,a%b) gcm if a<b: a,b=b,a
     a<b a b if (a%b==0): return b
     a%b==0 a%b a b 0 return gcm(b,a%b) gcm(b,a%b) gcm b a%b a b a a b b for s in sys.stdin:
    a,b=map(int,s.split())
    c=gcm(a,b)
    print "%d %d" %(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 "%d %d" %(c,a/c*b) "%d %d" (c,a/c*b) c a/c*b a/c a c b c=gcm(a,b) gcm(a,b) c b=map(int,s.split()) map(int,s.split()) b def gcm(a,b):
    if a<b: a,b=b,a
    if (a%b==0): return b
    return gcm(b,a%b) def gcm(a,b):
    if a<b: a,b=b,a
    if (a%b==0): return b
    return gcm(b,a%b) gcm a,b=map(int,s.split()) map(int,s.split()) a
import sys
def gcm(a,b):
    if a<b: a,b=b,a
    if (a%b==0): return b
    return gcm(b,a%b)

for s in sys.stdin:
    a,b=map(int,s.split())
    c=gcm(a,b)
    print "%d %d" %(c,a/c*b)