import sys
for e in sys.stdin:
 a,b=list(map(int,e.split()));p=a*b
 while b:a,b=b,a%b
 print(a,p//a) import sys sys for e in sys.stdin:
 a,b=list(map(int,e.split()));p=a*b
 while b:a,b=b,a%b
 print(a,p//a) e sys.stdin sys stdin a,b=list(map(int,e.split())) a list(map(int,e.split())) list map(int,e.split()) map int e.split() e.split e split b p=a*b p a*b a b while b:a,b=b,a%b
  b print(a,p//a) print a p//a p a b=list(map(int,e.split())) list(map(int,e.split())) b a,b=list(map(int,e.split())) list(map(int,e.split())) a p=a*b a*b p
import sys
for e in sys.stdin:
 a,b=list(map(int,e.split()));p=a*b
 while b:a,b=b,a%b
 print(a,p//a)
