#include <stdio.h>
int main()
{
    int a,b,c,k,gcd;
    scanf("%d %d %d",&a,&b,&c);

    for(k=1;k<=a&&k<=b&&k<=c;++k)
    {
        if(a%k==0&&b%k==0&&c%k==0)
            gcd=k;
    }
    printf("G.C.D of %d and %d and %d is %d",a,b,c,gcd);
    return 0;
}