def gcd(a,b):
	while b: a,b=b,a%b
	return a
while True:
	try:
		a,b = map(int,input().split())
		print(gcd(a,b),a*b//gcd(a,b))
	except:
		break; def gcd(a,b):
	while b: a,b=b,a%b
	return a gcd while b: a,b=b,a%b
	 b return a a a a b b while True:
	try:
		a,b = map(int,input().split())
		print(gcd(a,b),a*b//gcd(a,b))
	except:
		break; True try:
		a,b = map(int,input().split())
		print(gcd(a,b),a*b//gcd(a,b))
	except:
		break; except:
		break; break a,b = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b print(gcd(a,b),a*b//gcd(a,b)) print gcd(a,b) gcd a b a*b//gcd(a,b) a*b a b gcd(a,b) gcd a b def gcd(a,b):
	while b: a,b=b,a%b
	return a def gcd(a,b):
	while b: a,b=b,a%b
	return a gcd b = map(int,input().split()) map(int,input().split()) b a,b = map(int,input().split()) map(int,input().split()) a
def gcd(a,b):
	while b: a,b=b,a%b
	return a
while True:
	try:
		a,b = map(int,input().split())
		print(gcd(a,b),a*b//gcd(a,b))
	except:
		break;