Let $a$ and $b$ be integers, not both zero. Prove that for a positive integer $d$, $d=gcd(a, b)$ If and only if
1) $d$ divides $a$ ($d\vert a$) and $d$ divides $b$ ($d\vert b$) 2) whenever $c$ divides $a$ and $c$ divides $b$, then $c$ divides $d$ ..
How to deduce this theorem? I'm new to this stuff. Can somebody give a proper direction within this mathematics field?