import sys

def euclid(x, y):
	if y == 0: return x
	elif x < y: return euclid(y, x)
	else: return euclid(y, x%y)

for line in sys.stdin:
	a, b = map(int, line.split())
	gcd = euclid(a, b)
	lcm = a*b/gcd
	print str(gcd)+' '+str(lcm) import sys sys def euclid(x, y):
	if y == 0: return x
	elif x < y: return euclid(y, x)
	else: return euclid(y, x%y) euclid if y == 0: return x
	elif x < y: return euclid(y, x)
	else: return euclid(y, x%y) y == 0 y 0 elif x < y: return euclid(y, x)
	 x < y x y x x y y for line in sys.stdin:
	a, b = map(int, line.split())
	gcd = euclid(a, b)
	lcm = a*b/gcd
	print str(gcd)+' '+str(lcm) line sys.stdin sys stdin a, b = map(int, line.split()) a map(int, line.split()) map int line.split() line.split line split b gcd = euclid(a, b) gcd euclid(a, b) euclid a b lcm = a*b/gcd lcm a*b/gcd a*b a b gcd print str(gcd)+' '+str(lcm) str(gcd)+' ' str(gcd) str gcd ' ' str(lcm) str lcm b = map(int, line.split()) map(int, line.split()) b gcd = euclid(a, b) euclid(a, b) gcd a, b = map(int, line.split()) map(int, line.split()) a def euclid(x, y):
	if y == 0: return x
	elif x < y: return euclid(y, x)
	else: return euclid(y, x%y) def euclid(x, y):
	if y == 0: return x
	elif x < y: return euclid(y, x)
	else: return euclid(y, x%y) euclid lcm = a*b/gcd a*b/gcd lcm
import sys

def euclid(x, y):
	if y == 0: return x
	elif x < y: return euclid(y, x)
	else: return euclid(y, x%y)

for line in sys.stdin:
	a, b = map(int, line.split())
	gcd = euclid(a, b)
	lcm = a*b/gcd
	print str(gcd)+' '+str(lcm)
