def gcd(a, b):
    x = a
    while x > 1:
        if a % x == 0  and b % x == 0:
            return x
        else:
            x = x - 1
    return 1


def main():
    answer = gcd(12, 18)
    print "The greateest common divisor of 12 and 18 is %d" % answer
main()
