#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <string>

using namespace std;
int main()
{

double x,y,r,a,b;

cin>>x>>y;
a=x;
b=y;
while(x%y!=0)
{
r=x%y;
x=y;
y=r;
}
cout<<y<<" "<<a*b/y<<endl;
return 0;
}