import sys

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

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

for line in sys.stdin:
	a,b = map(int, line.split())
	print("{} {}".format(gcd(a,b),lcm(a,b))) import sys sys 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 def gcd(a,b):
	while True:
		a,b = b,a%b
		if b==0:
			return a gcd while True:
		a,b = b,a%b
		if b==0:
			return a True a,b = b,a%b a b b a%b a b if b==0:
			return a b==0 b 0 return a a a a b b for line in sys.stdin:
	a,b = map(int, line.split())
	print("{} {}".format(gcd(a,b),lcm(a,b))) 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 print("{} {}".format(gcd(a,b),lcm(a,b))) print "{} {}".format(gcd(a,b),lcm(a,b)) "{} {}".format "{} {}" format gcd(a,b) gcd a b lcm(a,b) lcm a b def gcd(a,b):
	while True:
		a,b = b,a%b
		if b==0:
			return a def gcd(a,b):
	while True:
		a,b = b,a%b
		if b==0:
			return a gcd a,b = map(int, line.split()) map(int, line.split()) a b = map(int, line.split()) map(int, line.split()) b def lcm(a,b):
	return a*b//gcd(a,b) def lcm(a,b):
	return a*b//gcd(a,b) lcm
import sys

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

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

for line in sys.stdin:
	a,b = map(int, line.split())
	print("{} {}".format(gcd(a,b),lcm(a,b)))