#include<stdio.h>
#include<string.h>
int main(int argc, const char *argv[])
{
int n,m,temp;
printf("请输入n");
scanf("%d",&n);
printf("请输入m");
scanf("%d",&m);
int sum=n*m;
while(m*n!=0)
{
temp=m%n;
m=n;
n=temp;
}
printf("最大公因数为%d\n",m);
printf("最小公倍数为%d\n",(sum/m));
return 0;
}