import math
john=[]
while True:
    try:
        john.append(input())
    except EOFError:
        break
for i in john:
    k=list(map(int,i.split()))
    print(int(math.gcd(k[0],k[1])),int(k[0]*k[1]/math.gcd(k[0],k[1])))
    
     import math math john=[] john [] while True:
    try:
        john.append(input())
    except EOFError:
        break True try:
        john.append(input())
    except EOFError:
        break except EOFError:
        break break john.append(input()) john.append john append input() input for i in john:
    k=list(map(int,i.split()))
    print(int(math.gcd(k[0],k[1])),int(k[0]*k[1]/math.gcd(k[0],k[1])))
    
     i john k=list(map(int,i.split())) k list(map(int,i.split())) list map(int,i.split()) map int i.split() i.split i split print(int(math.gcd(k[0],k[1])),int(k[0]*k[1]/math.gcd(k[0],k[1]))) print int(math.gcd(k[0],k[1])) int math.gcd(k[0],k[1]) math.gcd math gcd k[0] k 0 k[1] k 1 int(k[0]*k[1]/math.gcd(k[0],k[1])) int k[0]*k[1]/math.gcd(k[0],k[1]) k[0]*k[1] k[0] k 0 k[1] k 1 math.gcd(k[0],k[1]) math.gcd math gcd k[0] k 0 k[1] k 1 john=[] [] john k=list(map(int,i.split())) list(map(int,i.split())) k
import math
john=[]
while True:
    try:
        john.append(input())
    except EOFError:
        break
for i in john:
    k=list(map(int,i.split()))
    print(int(math.gcd(k[0],k[1])),int(k[0]*k[1]/math.gcd(k[0],k[1])))
    
    
