import std.stdio;
import std.conv;
import std.string;
import std.algorithm;
import std.array;

ulong gcd(ulong a, ulong b) {
	return b ? gcd(b, a%b) : a;
}

ulong lcm(ulong a, ulong b, ulong c) {
	return a/c*b;
}

void main() {
	while(1){
		ulong[] v = readln.split.map!(to!ulong).array;
		if (stdin.eof) break;

		ulong g = gcd(v[0], v[1]),
			  l = lcm(v[0], v[1], g);

		writefln("%s %s", g, l);
	}

}