#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int m,n,r;
int m_cup,n_cup;
scanf("%d %d", &m, &n);
if(m>0&&n>0)
{
m_cup=m;
n_cup=n;
while((r=m_cup%n_cup)!=0)
{
m_cup=n_cup;
n_cup=r;
}
printf("Greatest common divisor: %d\n", n_cup);
printf("Lease common multiple : %d\n", m * n / n_cup);
}
else printf("Error!\n");
system("pause");
return 0;
}