I am currently reading through Donald Knuth's The Art of Computer Programming, and in it he gives a proof of Euclid's algorithm for finding the greatest common divisor of two number, $m$ and $n$.
In the proof, he defines $r$ as the remainder when diving $m$ by $n$ (in other words $r = m \mod n$) and writes $m = qn+r$ for some positive integer $q$.
From this he deduces that any number that divides both $m$ and $n$ must also divide $m-qn = r$. Similarly, he also says that any number that divides both $n$ and $r$ must also divide $qn+r = m$, with no further explanation.
I do not understand where these last two statements are coming from. Any help to guide me through the logic being employed here would be appreciated.