#include <iostream>

#define MAX(x,y) ((x>y)?x:y)
#define MIN(x,y) ((x>y)?y:x)
int main(void)
{
	while(true)
	{
		int x=0,y=0,product;
		std::cin >> x >> y;
		if(std::cin.eof())
			break;
		product = x*y;
		//ユークリッドの何とか
		while(x && y){
			if(x>y)
				x = x % y;
			else
				y = y % x;
		}
		std::cout << (int)x << " " << (int)(product/x) << std::endl;//確かGCD*LCMと元の積は等しいはず。
	}
	return 0;
}