#include <iostream>
using namespace std;
void commondevisor(int,int,int &);
void main()
{
int m,n,r,p;
cin>>m>>n;
p=m*n;
commondevisor(m,n,r);
p=p/r; //最小公倍数
cout<<r<<" "<<p<<endl;
}
void commondevisor(int m,int n,int &r)
{
while(m%n!=0)
{
r=m%n;
m=n;
n=r;
}
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。