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

    for(K=1;++K;K<=a&&K<=b&&K<=c)
    {
        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;
}