def GCD(a,b):
    if(b==0):
        return a 
    return GCD(b,a%b)

def LCM(a,b):
    return a / GCD(a,b) * b


while True:
    try:
        x = list(map(int,input().split()))
        ans_1 = GCD(x[0],x[1])
        ans_2 = LCM(x[0],x[1])
        print("%d %d"%(ans_1,ans_2))
    
    except:
        break def GCD(a,b):
    if(b==0):
        return a 
    return GCD(b,a%b) GCD if(b==0):
        return a 
     b==0 b 0 return a a return GCD(b,a%b) GCD(b,a%b) GCD b a%b a b a a b b def LCM(a,b):
    return a / GCD(a,b) * b LCM return a / GCD(a,b) * b a / GCD(a,b) * b a / GCD(a,b) a GCD(a,b) GCD a b b a a b b while True:
    try:
        x = list(map(int,input().split()))
        ans_1 = GCD(x[0],x[1])
        ans_2 = LCM(x[0],x[1])
        print("%d %d"%(ans_1,ans_2))
    
    except:
        break True try:
        x = list(map(int,input().split()))
        ans_1 = GCD(x[0],x[1])
        ans_2 = LCM(x[0],x[1])
        print("%d %d"%(ans_1,ans_2))
    
    except:
        break except:
        break break x = list(map(int,input().split())) x list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans_1 = GCD(x[0],x[1]) ans_1 GCD(x[0],x[1]) GCD x[0] x 0 x[1] x 1 ans_2 = LCM(x[0],x[1]) ans_2 LCM(x[0],x[1]) LCM x[0] x 0 x[1] x 1 print("%d %d"%(ans_1,ans_2)) print "%d %d"%(ans_1,ans_2) "%d %d" (ans_1,ans_2) ans_1 ans_2 def GCD(a,b):
    if(b==0):
        return a 
    return GCD(b,a%b) def GCD(a,b):
    if(b==0):
        return a 
    return GCD(b,a%b) GCD def LCM(a,b):
    return a / GCD(a,b) * b def LCM(a,b):
    return a / GCD(a,b) * b LCM x = list(map(int,input().split())) list(map(int,input().split())) x ans_1 = GCD(x[0],x[1]) GCD(x[0],x[1]) ans_1 ans_2 = LCM(x[0],x[1]) LCM(x[0],x[1]) ans_2
def GCD(a,b):
    if(b==0):
        return a 
    return GCD(b,a%b)

def LCM(a,b):
    return a / GCD(a,b) * b


while True:
    try:
        x = list(map(int,input().split()))
        ans_1 = GCD(x[0],x[1])
        ans_2 = LCM(x[0],x[1])
        print("%d %d"%(ans_1,ans_2))
    
    except:
        break
