import sys

def gcd(a,b):
	while a%b :
		a,b=b,a%b
	return b
	
def lcm(a,b) :
	return a*b/gcd(a,b)
	
for ab in sys.stdin:
	a,b = map(int,ab.split())
	a,b = max(a,b),min(a,b)
	print "%d" % gcd(a,b),
	print "%d" % lcm(a,b) import sys sys def gcd(a,b):
	while a%b :
		a,b=b,a%b
	return b
	 gcd while a%b :
		a,b=b,a%b
	 a%b a b a,b=b,a%b a b b a%b a b return b 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 ab in sys.stdin:
	a,b = map(int,ab.split())
	a,b = max(a,b),min(a,b)
	print "%d" % gcd(a,b),
	print "%d" % lcm(a,b) ab sys.stdin sys stdin a,b = map(int,ab.split()) a map(int,ab.split()) map int ab.split() ab.split ab split b a,b = max(a,b),min(a,b) a max(a,b) max a b b min(a,b) min a b print "%d" % gcd(a,b) "%d" gcd(a,b) gcd a b print "%d" % lcm(a,b) "%d" lcm(a,b) lcm a b b = map(int,ab.split()) map(int,ab.split()) b a,b = map(int,ab.split()) map(int,ab.split()) a def gcd(a,b):
	while a%b :
		a,b=b,a%b
	return b
	 def gcd(a,b):
	while a%b :
		a,b=b,a%b
	return b
	 gcd b = max(a,b),min(a,b) min(a,b) b def lcm(a,b) :
	return a*b/gcd(a,b)
	 def lcm(a,b) :
	return a*b/gcd(a,b)
	 lcm a,b = max(a,b),min(a,b) max(a,b) a
import sys

def gcd(a,b):
	while a%b :
		a,b=b,a%b
	return b
	
def lcm(a,b) :
	return a*b/gcd(a,b)
	
for ab in sys.stdin:
	a,b = map(int,ab.split())
	a,b = max(a,b),min(a,b)
	print "%d" % gcd(a,b),
	print "%d" % lcm(a,b)