#include <iostream>
using namespace std;
int num[2];
inline int gcd(int a, int b)
{
	return num[0] = b == 0 ? a : gcd(b, a%b);
}
inline int* lcm(int a, int b)
{
	num[1] = a/gcd(a, b)*b;
	return num;
}
int main()
{
	int a, b;
	while(scanf("%d%d", &a, &b) != EOF)
	{
		if(a < b) swap(a, b);
		lcm(a, b);
		printf("%d %d\n", num[0], num[1]);
	}
	return 0;
}