import sys
def gcd(a,b):
	if b != 0:
		return gcd(b,a%b)
	else:
		return a
def lcm(a,b,g):
	return b / g * a
for s in sys.stdin:
	ls = map(int,s.split(' '))
	print "%d %d" % (gcd(ls[0],ls[1]),lcm(ls[0],ls[1],gcd(ls[0],ls[1]))) import sys sys def gcd(a,b):
	if b != 0:
		return gcd(b,a%b)
	else:
		return a gcd if b != 0:
		return gcd(b,a%b)
	else:
		return a b != 0 b 0 return gcd(b,a%b) gcd(b,a%b) gcd b a%b a b return a a a a b b def lcm(a,b,g):
	return b / g * a lcm return b / g * a b / g * a b / g b g a a a b b g g for s in sys.stdin:
	ls = map(int,s.split(' '))
	print "%d %d" % (gcd(ls[0],ls[1]),lcm(ls[0],ls[1],gcd(ls[0],ls[1]))) s sys.stdin sys stdin ls = map(int,s.split(' ')) ls map(int,s.split(' ')) map int s.split(' ') s.split s split ' ' print "%d %d" % (gcd(ls[0],ls[1]),lcm(ls[0],ls[1],gcd(ls[0],ls[1]))) "%d %d" (gcd(ls[0],ls[1]),lcm(ls[0],ls[1],gcd(ls[0],ls[1]))) gcd(ls[0],ls[1]) gcd ls[0] ls 0 ls[1] ls 1 lcm(ls[0],ls[1],gcd(ls[0],ls[1])) lcm ls[0] ls 0 ls[1] ls 1 gcd(ls[0],ls[1]) gcd ls[0] ls 0 ls[1] ls 1 ls = map(int,s.split(' ')) map(int,s.split(' ')) ls def lcm(a,b,g):
	return b / g * a def lcm(a,b,g):
	return b / g * a lcm def gcd(a,b):
	if b != 0:
		return gcd(b,a%b)
	else:
		return a def gcd(a,b):
	if b != 0:
		return gcd(b,a%b)
	else:
		return a gcd
import sys
def gcd(a,b):
	if b != 0:
		return gcd(b,a%b)
	else:
		return a
def lcm(a,b,g):
	return b / g * a
for s in sys.stdin:
	ls = map(int,s.split(' '))
	print "%d %d" % (gcd(ls[0],ls[1]),lcm(ls[0],ls[1],gcd(ls[0],ls[1])))