#include<stdio.h>
int f(int x,int y);
int d(int x,int y);
int main()
{
int n,m,r;
scanf("%d%d",&m,&n);
printf("%d %d",f(m,n),d(m,n));
return 0;
}
int f(int x,int y)
{ int r,t;
if(y>x)
{t=y;y=x;x=t;
}
r=x%y;
do{
x=y;
y=r;
r=x%y;
}while(r);
return y;
}
int d(int x,int y)
{int s;
s=x*y/f(x,y);
return s;
}
标签:do,return,int,scanf,x%,29.1311,include From: https://blog.51cto.com/u_15758636/5890225