Found an exercise that states to prove that $(a,b) \mid a,b$. It wants to use the fact that for the set of linear combinations ($S = ax+by, x,y \in \mathbb {Z}$) of $a, b$, need be a smallest positive value, let $h$ (by the W.O. principle).   

Next, it wants to use the division algorithm to write $a = qh + r, 0 \le r \lt h$, to show that $r \in S$, and deduce that $h \mid a,b$.

I am not at all clear about the scheme, i.e. using the division algorithm,