t = 0
while t == 0:	
	try:
		x,y=[int(i) for i in input().split()]
	except:
		break
	else:
		a = x * y
		if x < y:
			x,y =y,x
		while y > 0:
			r = x % y
			x = y
			y = r
	print(str(x) + " " + str(int(a / x))) t = 0 t 0 while t == 0:	
	try:
		x,y=[int(i) for i in input().split()]
	except:
		break
	else:
		a = x * y
		if x < y:
			x,y =y,x
		while y > 0:
			r = x % y
			x = y
			y = r
	print(str(x) + " " + str(int(a / x))) t == 0 t 0 try:
		x,y=[int(i) for i in input().split()]
	except:
		break
	else:
		a = x * y
		if x < y:
			x,y =y,x
		while y > 0:
			r = x % y
			x = y
			y = r
	 except:
		break
	 break int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i x,y=[int(i) for i in input().split()] x [int(i) for i in input().split()] y a = x * y a x * y x y if x < y:
			x,y =y,x
		 x < y x y x,y =y,x x y y x while y > 0:
			r = x % y
			x = y
			y = r
	 y > 0 y 0 r = x % y r x % y x y x = y x y y = r y r print(str(x) + " " + str(int(a / x))) print str(x) + " " + str(int(a / x)) str(x) + " " str(x) str x " " str(int(a / x)) str int(a / x) int a / x a x y =y,x x y t = 0 0 t x,y =y,x y x x = y y x y = r r y y=[int(i) for i in input().split()] [int(i) for i in input().split()] y a = x * y x * y a r = x % y x % y r x,y=[int(i) for i in input().split()] [int(i) for i in input().split()] x
t = 0
while t == 0:	
	try:
		x,y=[int(i) for i in input().split()]
	except:
		break
	else:
		a = x * y
		if x < y:
			x,y =y,x
		while y > 0:
			r = x % y
			x = y
			y = r
	print(str(x) + " " + str(int(a / x)))