#include <iostream>
#include <vector>
using namespace std;

long gcd(int a,int b){
	if(a == 0)return b;
	else if(a > b)return gcd(a%b,b);
	return gcd(b%a,a);
}

int main(){
	long long a,b;
	vector<long long*> output;
	while(!cin.eof()){
		cin >> a >> b;
		long long g[2];
		g[0] = gcd(a,b);
		g[1] = a*(b/g[0]);
	}
	vector<long long*>::iterator it = output.begin();
	for(;it != output.end();++it)
		cout << (*it)[0] << " " << (*it)[1] << endl;

	return 0;
}