#include <iostream>
using namespace std;
int main()
{
int a, b, temp1, temp2;
int c;
cout << "请按从大到小的顺序两个数字" << endl;
cin >> a >> b;
temp1 = a, temp2 = b;
while (temp2 != 0)
{
c = temp1 % temp2;
temp1 = temp2;
temp2 = c;
}
cout <<"最大公约数是"<< temp1 << endl;
cout << "最小公倍数是" << a / temp1 * b;
}