#include <stdio.h>
int main()
{
int n = 28;
int d = 4;
int tempI = 0; int tempJ = 0;
for (int i = 1; i < n; i++)
{
for (int j = i; j < n; j++)
{
tempI = i; tempJ = j;
while (tempI != tempJ) //Facem cmmdc
{
if (tempI > tempJ) tempI = tempI - tempJ;
else tempJ = tempJ - tempI;
}
if(tempI == 4)
printf("CMMDC(%d,%d)=%d\n",i,j,tempI);
}
}
return 0;
}