include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
typedef pair[HTML_REMOVED] PII;
int gcd(int a, int b)
{
return b ? gcd(b, a % b) : a;
}
int lcm(int a,int b){
return a*b/gcd(a,b);
}
int main(){
int n,m;
cin>>n>>m;
cout<<gcd(n,m)<<endl<<lcm(n,m)<<endl;
return 0;
}