import sys

def gcd(a,b):
	if b == 0:
		return a
	else:
		return gcd(b,a%b)

def lcm(a,b):
	return a*b/gcd(a,b)

for s in sys.stdin:
	i = map(int,s.split())
	print gcd(*i), lcm(*i) import sys sys def gcd(a,b):
	if b == 0:
		return a
	else:
		return gcd(b,a%b) gcd if b == 0:
		return a
	else:
		return gcd(b,a%b) 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 s in sys.stdin:
	i = map(int,s.split())
	print gcd(*i), lcm(*i) s sys.stdin sys stdin i = map(int,s.split()) i map(int,s.split()) map int s.split() s.split s split print gcd(*i) gcd *i i lcm(*i) lcm *i i def gcd(a,b):
	if b == 0:
		return a
	else:
		return gcd(b,a%b) def gcd(a,b):
	if b == 0:
		return a
	else:
		return gcd(b,a%b) gcd def lcm(a,b):
	return a*b/gcd(a,b) def lcm(a,b):
	return a*b/gcd(a,b) lcm i = map(int,s.split()) map(int,s.split()) i
import sys

def gcd(a,b):
	if b == 0:
		return a
	else:
		return gcd(b,a%b)

def lcm(a,b):
	return a*b/gcd(a,b)

for s in sys.stdin:
	i = map(int,s.split())
	print gcd(*i), lcm(*i)