# coding: utf-8

while True:
	try:
		data = map(int, raw_input().split())
		if data[0] > data[1]:
			a = data[0]
			b = data[1]
		else:
			a = data[1]
			b = data[0]
		
		r = 1
		while r > 0:
			q = a / b
			r = a - b * q
			a = b
			b = r
		gcd = a
		lcm = data[0] * data[1] / gcd

		print("{:} {:}".format(gcd, lcm))

	except EOFError:
		break while True:
	try:
		data = map(int, raw_input().split())
		if data[0] > data[1]:
			a = data[0]
			b = data[1]
		else:
			a = data[1]
			b = data[0]
		
		r = 1
		while r > 0:
			q = a / b
			r = a - b * q
			a = b
			b = r
		gcd = a
		lcm = data[0] * data[1] / gcd

		print("{:} {:}".format(gcd, lcm))

	except EOFError:
		break True try:
		data = map(int, raw_input().split())
		if data[0] > data[1]:
			a = data[0]
			b = data[1]
		else:
			a = data[1]
			b = data[0]
		
		r = 1
		while r > 0:
			q = a / b
			r = a - b * q
			a = b
			b = r
		gcd = a
		lcm = data[0] * data[1] / gcd

		print("{:} {:}".format(gcd, lcm))

	except EOFError:
		break except EOFError:
		break break data = map(int, raw_input().split()) data map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split if data[0] > data[1]:
			a = data[0]
			b = data[1]
		else:
			a = data[1]
			b = data[0]
		
		 data[0] > data[1] data[0] data 0 data[1] data 1 a = data[0] a data[0] data 0 b = data[1] b data[1] data 1 a = data[1] a data[1] data 1 b = data[0] b data[0] data 0 r = 1 r 1 while r > 0:
			q = a / b
			r = a - b * q
			a = b
			b = r
		 r > 0 r 0 q = a / b q a / b a b r = a - b * q r a - b * q a b * q b q a = b a b b = r b r gcd = a gcd a lcm = data[0] * data[1] / gcd lcm data[0] * data[1] / gcd data[0] * data[1] data[0] data 0 data[1] data 1 gcd print("{:} {:}".format(gcd, lcm)) print "{:} {:}".format(gcd, lcm) "{:} {:}".format "{:} {:}" format gcd lcm b = data[0] data[0] b r = 1 1 r r = a - b * q a - b * q r a = b b a b = data[1] data[1] b a = data[0] data[0] a q = a / b a / b q data = map(int, raw_input().split()) map(int, raw_input().split()) data a = data[1] data[1] a lcm = data[0] * data[1] / gcd data[0] * data[1] / gcd lcm b = r r b gcd = a a gcd
# coding: utf-8

while True:
	try:
		data = map(int, raw_input().split())
		if data[0] > data[1]:
			a = data[0]
			b = data[1]
		else:
			a = data[1]
			b = data[0]
		
		r = 1
		while r > 0:
			q = a / b
			r = a - b * q
			a = b
			b = r
		gcd = a
		lcm = data[0] * data[1] / gcd

		print("{:} {:}".format(gcd, lcm))

	except EOFError:
		break