import sys
for n in sys.stdin:
	l=map(int,n.split())
	b=l[0]*l[1]
	u=[max(l),min(l)]
	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:
	l=map(int,n.split())
	b=l[0]*l[1]
	u=[max(l),min(l)]
	while u[1]!=0:
		u=[u[1],u[0]%u[1]]
	print "%d %d"%(u[0],b/u[0]) n sys.stdin sys stdin l=map(int,n.split()) l map(int,n.split()) map int n.split() n.split n split b=l[0]*l[1] b l[0]*l[1] l[0] l 0 l[1] l 1 u=[max(l),min(l)] u [max(l),min(l)] max(l) max l min(l) min l while u[1]!=0:
		u=[u[1],u[0]%u[1]]
	 u[1]!=0 u[1] u 1 0 u=[u[1],u[0]%u[1]] u [u[1],u[0]%u[1]] u[1] u 1 u[0]%u[1] u[0] u 0 u[1] u 1 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=[max(l),min(l)] [max(l),min(l)] u u=[u[1],u[0]%u[1]] [u[1],u[0]%u[1]] u l=map(int,n.split()) map(int,n.split()) l b=l[0]*l[1] l[0]*l[1] b
import sys
for n in sys.stdin:
	l=map(int,n.split())
	b=l[0]*l[1]
	u=[max(l),min(l)]
	while u[1]!=0:
		u=[u[1],u[0]%u[1]]
	print "%d %d"%(u[0],b/u[0])