import math
import sys
if __name__ == '__main__':

	for line in sys.stdin:
		a,b = map(int,line.split())
		print(math.gcd(a,b),(a*b) // math.gcd(a,b))
 import math math import sys sys if __name__ == '__main__':

	for line in sys.stdin:
		a,b = map(int,line.split())
		print(math.gcd(a,b),(a*b) // math.gcd(a,b)) __name__ == '__main__' __name__ '__main__' for line in sys.stdin:
		a,b = map(int,line.split())
		print(math.gcd(a,b),(a*b) // math.gcd(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(math.gcd(a,b),(a*b) // math.gcd(a,b)) print math.gcd(a,b) math.gcd math gcd a b (a*b) // math.gcd(a,b) a*b a b math.gcd(a,b) math.gcd math gcd a b a,b = map(int,line.split()) map(int,line.split()) a b = map(int,line.split()) map(int,line.split()) b
import math
import sys
if __name__ == '__main__':

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

