#include<stdio.h>
int main()
{
int num1, num2,temp;
scanf("%d%d",&num1,&num2);
int t1 = num1;
int t2 = num2;
while (num2 != 0)
{
temp = num1%num2;
num1 = num2;
num2 = temp;
printf("num1=%d,num2=%d,temp=%d\n", num1, num2, temp);
}
printf("最大公约数为%d\n", num1);
printf("最小公倍数为%d\n",(t1*t2)/num1);
return 0;
}