#include <iostream>
using namespace std;

#define ULL_INT unsigned long long int

ULL_INT GCD(ULL_INT a, ULL_INT b) {
	if (a < b) swap(a, b);
	a = a % b; return (a == 0 ? b : GCD(a, b));
}

ULL_INT LCM(ULL_INT a, ULL_INT b) {
	return a * b / GCD(a, b);
}

int main() {
	ULL_INT a, b;
	while (cin >> a >> b) 
		cout << GCD(a, b) << " " << LCM(a, b) << endl;
	return 0;
}
