# GCD and LCM

import sys


def gcd(x, y):
	while x != y:
		if x > y:
			x -= y
		else:
			y -= x
	return x

datas = []

for line in sys.stdin:
	datas.append(map(int, line.split()))

for data in datas:
	g = gcd(data[0], data[1])
	print "{0} {1}".format(g, data[0] * data[1] / g) import sys sys def gcd(x, y):
	while x != y:
		if x > y:
			x -= y
		else:
			y -= x
	return x gcd while x != y:
		if x > y:
			x -= y
		else:
			y -= x
	 x != y x y if x > y:
			x -= y
		else:
			y -= x
	 x > y x y x -= y x y y -= x y x return x x x x y y datas = [] datas [] for line in sys.stdin:
	datas.append(map(int, line.split())) line sys.stdin sys stdin datas.append(map(int, line.split())) datas.append datas append map(int, line.split()) map int line.split() line.split line split for data in datas:
	g = gcd(data[0], data[1])
	print "{0} {1}".format(g, data[0] * data[1] / g) data datas g = gcd(data[0], data[1]) g gcd(data[0], data[1]) gcd data[0] data 0 data[1] data 1 print "{0} {1}".format(g, data[0] * data[1] / g) "{0} {1}".format "{0} {1}" format g data[0] * data[1] / g data[0] * data[1] data[0] data 0 data[1] data 1 g g = gcd(data[0], data[1]) gcd(data[0], data[1]) g datas = [] [] datas def gcd(x, y):
	while x != y:
		if x > y:
			x -= y
		else:
			y -= x
	return x def gcd(x, y):
	while x != y:
		if x > y:
			x -= y
		else:
			y -= x
	return x gcd
# GCD and LCM

import sys


def gcd(x, y):
	while x != y:
		if x > y:
			x -= y
		else:
			y -= x
	return x

datas = []

for line in sys.stdin:
	datas.append(map(int, line.split()))

for data in datas:
	g = gcd(data[0], data[1])
	print "{0} {1}".format(g, data[0] * data[1] / g)