#include <iostream>
#include <cstdio>

using namespace std;

typedef pair<int, int> P;

int gcd(int a, int b) {
	if (a == 0) return b;
	if (b == 0) return a;

	return gcd(b, a % b);
}

P lcm(int a, int b) {
	int g = gcd(a, b);

	return P(g, a / g * b);
}

int main() {
	char s[1000];
	while (1) {
		string str;
		if ( !getline(cin, str) ) break;

		for (int i = 0; i < str.size(); ++i)
			s[i] = str[i];
		s[str.size()] = '\0';

		int a, b;
		sscanf(s, "%d%d", &a, &b);

		P p = lcm(a, b);

		cout << p.first << " " << p.second << endl;
	}
}