#include<iostream>

#define     MAX_NUMBER         2000000000
#define     __ERROR_CODE__     (-1)

using namespace std;

int Integer_LCM(const unsigned int,const unsigned int);
int Integer_GCD(const unsigned int,const unsigned int);

int main(){
	int a,b;

	while(cin >> a >> b){
		cout << Integer_LCM(a,b) << " " << Integer_GCD(a,b) << endl;
	}

	return 0;
}

int Integer_LCM(const unsigned int a,const unsigned int b){
	int p,q,r;

	// 入力値の確認
	if((a <= 0) || (b <= 0) || (a > ((int)(MAX_NUMBER))) || (b > ((int)(MAX_NUMBER)))){
		return ((int)(__ERROR_CODE__));
	}

	// 変数の初期化
	p = a;
	q = b;
	r = a % b;

	// ユークリッドの互除法
	while (r != 0){
		p = q;
		q = r;
		r = p % q;
	}

	return q;
}

int Integer_GCD(const unsigned int a,const unsigned int b){
	// 入力値の確認
	if((a <= 0) || (b <= 0) || (a > ((int)(MAX_NUMBER))) || (b > ((int)(MAX_NUMBER)))){
		return ((int)(__ERROR_CODE__));
	}

	return ((a * b) / Integer_LCM(a,b));
}