def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a%b)
while True:
	try:
		a, b = map(int, raw_input().strip().split(' '))
		print "%d %d" % (gcd(a, b), a*b/gcd(a, b))
	except EOFError:
		break def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a%b) gcd if b == 0:
		return a
	 b == 0 b 0 return a a return gcd(b, a%b) gcd(b, a%b) gcd b a%b a b a a b b while True:
	try:
		a, b = map(int, raw_input().strip().split(' '))
		print "%d %d" % (gcd(a, b), a*b/gcd(a, b))
	except EOFError:
		break True try:
		a, b = map(int, raw_input().strip().split(' '))
		print "%d %d" % (gcd(a, b), a*b/gcd(a, b))
	except EOFError:
		break except EOFError:
		break break a, b = map(int, raw_input().strip().split(' ')) a map(int, raw_input().strip().split(' ')) map int raw_input().strip().split(' ') ().strip().split ().strip() ().strip () raw_input strip split ' ' b print "%d %d" % (gcd(a, b), a*b/gcd(a, b)) "%d %d" (gcd(a, b), a*b/gcd(a, b)) gcd(a, b) gcd a b a*b/gcd(a, b) a*b a b gcd(a, b) gcd a b b = map(int, raw_input().strip().split(' ')) map(int, raw_input().strip().split(' ')) b a, b = map(int, raw_input().strip().split(' ')) map(int, raw_input().strip().split(' ')) a def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a%b) def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a%b) gcd
def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a%b)
while True:
	try:
		a, b = map(int, raw_input().strip().split(' '))
		print "%d %d" % (gcd(a, b), a*b/gcd(a, b))
	except EOFError:
		break