import sys;

def gcd(a, b):
	if b == 0:
		return a;
	return gcd(b, a % b);
	
def lcm(a, b):
	return a * b // gcd(a, b);

for line in sys.stdin:
	[a, b] = [int(num) for num in line.split()];
	print(str(gcd(a, b)) + ' ' + str(lcm(a, b))); import sys sys 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 def lcm(a, b):
	return a * b // gcd(a, b); lcm return a * b // gcd(a, b) a * b // gcd(a, b) a * b a b gcd(a, b) gcd a b a a b b for line in sys.stdin:
	[a, b] = [int(num) for num in line.split()];
	print(str(gcd(a, b)) + ' ' + str(lcm(a, b))); line sys.stdin sys stdin int(num) for num in line.split() for num in line.split() num line.split() line.split line split for num in line.split() int(num) int num [a, b] = [int(num) for num in line.split()] [a, b] a b [int(num) for num in line.split()] print(str(gcd(a, b)) + ' ' + str(lcm(a, b))) print str(gcd(a, b)) + ' ' + str(lcm(a, b)) str(gcd(a, b)) + ' ' str(gcd(a, b)) str gcd(a, b) gcd a b ' ' str(lcm(a, b)) str lcm(a, b) lcm a b def lcm(a, b):
	return a * b // gcd(a, b); def lcm(a, b):
	return a * b // gcd(a, b); lcm 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
import sys;

def gcd(a, b):
	if b == 0:
		return a;
	return gcd(b, a % b);
	
def lcm(a, b):
	return a * b // gcd(a, b);

for line in sys.stdin:
	[a, b] = [int(num) for num in line.split()];
	print(str(gcd(a, b)) + ' ' + str(lcm(a, b)));