import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;
import std.numeric;

void main()
{
    foreach(s;stdin.byLine())
    {
        auto m = s.split().map!(to!long)();
        immutable a=m[0], b=m[1], g=gcd(a,b);
        writeln(g," ",a/g*b);
    }
}