def GcdLcm(a, b):
	p = a * b
	if a < b:
		a, b = b, a
	r = a % b
	while r != 0:
		a = b
		b = r
		r = a % b
	return [b, int(p / b)]

while True:
	try:
		a, b = [eval(item) for item in input().split()]
		g, l = GcdLcm(a, b)
		print(str(g), str(l))
	except EOFError:
		break def GcdLcm(a, b):
	p = a * b
	if a < b:
		a, b = b, a
	r = a % b
	while r != 0:
		a = b
		b = r
		r = a % b
	return [b, int(p / b)] GcdLcm p = a * b p a * b a b if a < b:
		a, b = b, a
	 a < b a b a, b = b, a a b b a r = a % b r a % b a b while r != 0:
		a = b
		b = r
		r = a % b
	 r != 0 r 0 a = b a b b = r b r r = a % b r a % b a b return [b, int(p / b)] [b, int(p / b)] b int(p / b) int p / b p b a a b b while True:
	try:
		a, b = [eval(item) for item in input().split()]
		g, l = GcdLcm(a, b)
		print(str(g), str(l))
	except EOFError:
		break True try:
		a, b = [eval(item) for item in input().split()]
		g, l = GcdLcm(a, b)
		print(str(g), str(l))
	except EOFError:
		break except EOFError:
		break break eval(item) for item in input().split() for item in input().split() item input().split() ().split () input split for item in input().split() eval(item) eval item a, b = [eval(item) for item in input().split()] a [eval(item) for item in input().split()] b g, l = GcdLcm(a, b) g GcdLcm(a, b) GcdLcm a b l print(str(g), str(l)) print str(g) str g str(l) str l b = [eval(item) for item in input().split()] [eval(item) for item in input().split()] b g, l = GcdLcm(a, b) GcdLcm(a, b) g a, b = [eval(item) for item in input().split()] [eval(item) for item in input().split()] a def GcdLcm(a, b):
	p = a * b
	if a < b:
		a, b = b, a
	r = a % b
	while r != 0:
		a = b
		b = r
		r = a % b
	return [b, int(p / b)] def GcdLcm(a, b):
	p = a * b
	if a < b:
		a, b = b, a
	r = a % b
	while r != 0:
		a = b
		b = r
		r = a % b
	return [b, int(p / b)] GcdLcm l = GcdLcm(a, b) GcdLcm(a, b) l
def GcdLcm(a, b):
	p = a * b
	if a < b:
		a, b = b, a
	r = a % b
	while r != 0:
		a = b
		b = r
		r = a % b
	return [b, int(p / b)]

while True:
	try:
		a, b = [eval(item) for item in input().split()]
		g, l = GcdLcm(a, b)
		print(str(g), str(l))
	except EOFError:
		break