def GCD(a,b):
    S=[a,b]
    S.sort(reverse=True)
    while S[1]>0:
        S2=[S[1],S[0]%S[1]]
        S=S2
    return S[0]
    
try:
    while True:
        a,b=[int(i) for i in input().split(" ")]
        G=GCD(a,b)
        L=int(a*b/G)
        print("%d %d"%(G,L))
except EOFError:
    pass
 def GCD(a,b):
    S=[a,b]
    S.sort(reverse=True)
    while S[1]>0:
        S2=[S[1],S[0]%S[1]]
        S=S2
    return S[0]
     GCD S=[a,b] S [a,b] a b S.sort(reverse=True) S.sort S sort reverse=True reverse True while S[1]>0:
        S2=[S[1],S[0]%S[1]]
        S=S2
     S[1]>0 S[1] S 1 0 S2=[S[1],S[0]%S[1]] S2 [S[1],S[0]%S[1]] S[1] S 1 S[0]%S[1] S[0] S 0 S[1] S 1 S=S2 S S2 return S[0] S[0] S 0 a a b b try:
    while True:
        a,b=[int(i) for i in input().split(" ")]
        G=GCD(a,b)
        L=int(a*b/G)
        print("%d %d"%(G,L))
except EOFError:
    pass except EOFError:
    pass while True:
        a,b=[int(i) for i in input().split(" ")]
        G=GCD(a,b)
        L=int(a*b/G)
        print("%d %d"%(G,L)) True int(i) for i in input().split(" ") for i in input().split(" ") i input().split(" ") ().split () input split " " for i in input().split(" ") int(i) int i a,b=[int(i) for i in input().split(" ")] a [int(i) for i in input().split(" ")] b G=GCD(a,b) G GCD(a,b) GCD a b L=int(a*b/G) L int(a*b/G) int a*b/G a*b a b G print("%d %d"%(G,L)) print "%d %d"%(G,L) "%d %d" (G,L) G L a,b=[int(i) for i in input().split(" ")] [int(i) for i in input().split(" ")] a G=GCD(a,b) GCD(a,b) G b=[int(i) for i in input().split(" ")] [int(i) for i in input().split(" ")] b L=int(a*b/G) int(a*b/G) L def GCD(a,b):
    S=[a,b]
    S.sort(reverse=True)
    while S[1]>0:
        S2=[S[1],S[0]%S[1]]
        S=S2
    return S[0]
     def GCD(a,b):
    S=[a,b]
    S.sort(reverse=True)
    while S[1]>0:
        S2=[S[1],S[0]%S[1]]
        S=S2
    return S[0]
     GCD
def GCD(a,b):
    S=[a,b]
    S.sort(reverse=True)
    while S[1]>0:
        S2=[S[1],S[0]%S[1]]
        S=S2
    return S[0]
    
try:
    while True:
        a,b=[int(i) for i in input().split(" ")]
        G=GCD(a,b)
        L=int(a*b/G)
        print("%d %d"%(G,L))
except EOFError:
    pass

