import sys
for n in sys.stdin:
	u=map(int,n.split())
	b=u[0]*u[1]
	while u[1]!=0:u=[u[1],u[0]%u[1]]
	print "%d %d"%(u[0],b/u[0]) import sys sys for n in sys.stdin:
	u=map(int,n.split())
	b=u[0]*u[1]
	while u[1]!=0:u=[u[1],u[0]%u[1]]
	print "%d %d"%(u[0],b/u[0]) n sys.stdin sys stdin u=map(int,n.split()) u map(int,n.split()) map int n.split() n.split n split b=u[0]*u[1] b u[0]*u[1] u[0] u 0 u[1] u 1 while u[1]!=0:u=[u[1],u[0]%u[1]]
	 u[1]!=0 u[1] u 1 0 print "%d %d"%(u[0],b/u[0]) "%d %d" (u[0],b/u[0]) u[0] u 0 b/u[0] b u[0] u 0 u=map(int,n.split()) map(int,n.split()) u b=u[0]*u[1] u[0]*u[1] b
import sys
for n in sys.stdin:
	u=map(int,n.split())
	b=u[0]*u[1]
	while u[1]!=0:u=[u[1],u[0]%u[1]]
	print "%d %d"%(u[0],b/u[0])