#include<cstdio>
#include<iostream>
int main()
{
int max = 0;
int min = 0;
int temp = 0;
int mul = 0;
scanf("%d %d", &max, &min);
mul = max * min;
if (max < min)
{
temp = max;
max = min;
min = temp;
}
while (max % min != 0)
{
temp = min;
min = max % min;
max = temp;
}
printf("LCM=%d\n", mul/min);
printf("GCD=%d\n", min);
return 0;
}
#include<iostream>
int main()
{
int max = 0;
int min = 0;
int temp = 0;
int mul = 0;
scanf("%d %d", &max, &min);
mul = max * min;
if (max < min)
{
temp = max;
max = min;
min = temp;
}
while (max % min != 0)
{
temp = min;
min = max % min;
max = temp;
}
printf("LCM=%d\n", mul/min);
printf("GCD=%d\n", min);
return 0;
}