import sys
for l in sys.stdin:
 x,y=map(int, l.split())
 m=x*y
 while x%y:x,y=y,x%y
 print "%d %d"%(y,m/y) import sys sys for l in sys.stdin:
 x,y=map(int, l.split())
 m=x*y
 while x%y:x,y=y,x%y
 print "%d %d"%(y,m/y) l sys.stdin sys stdin x,y=map(int, l.split()) x map(int, l.split()) map int l.split() l.split l split y m=x*y m x*y x y while x%y:x,y=y,x%y
  x%y x y print "%d %d"%(y,m/y) "%d %d" (y,m/y) y m/y m y m=x*y x*y m y=map(int, l.split()) map(int, l.split()) y x,y=map(int, l.split()) map(int, l.split()) x
import sys
for l in sys.stdin:
 x,y=map(int, l.split())
 m=x*y
 while x%y:x,y=y,x%y
 print "%d %d"%(y,m/y)