import sys

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


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

for line in sys.stdin:
	a, b = map(int , line.split())
	print gcd(a,b), lcm(a,b) import sys sys def gcd(a, b):
	while b:
		a, b = b, a % b
	return a gcd while b:
		a, b = b, a % b
	 b a, b = b, a % b a b b a % b a b return a a 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 = map(int , line.split())
	print 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 gcd(a,b) gcd a b lcm(a,b) lcm a b 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 def gcd(a, b):
	while b:
		a, b = b, a % b
	return a def gcd(a, b):
	while b:
		a, b = b, a % b
	return a gcd a, b = map(int , line.split()) map(int , line.split()) a
import sys

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


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

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