gcd[a_, 0] := a

gcd[a_, b_] := gcd[b, Mod[a, b]]
