TITLE: Prove that if $n$ is composite then there are integers $a$ and $b$ s.t. $n \mid ab$ but $n \nmid a$ or $n \nmid b$
QUESTION [5 upvotes]: I tried proving the above statement, but I am not sure if it is completely right - especially towards the end.
Proof : Let $n$ be composite, then by definition we have $n=ab$ for some non-zero integers $a$ and $b$ with $a,b \neq \pm 1,\pm n$.
Clearly, $n \mid ab$. Let if possible, $n \mid a$. Then $\exists$ a non-zero $k \in \mathbb{Z}$ s.t. $a=kn$.
Then, $n=ab=knb \implies 1=kb$, which is a contradiction since the product of two non-zero integers $k, b$ s.t. $b \neq \pm 1$ cannot be equal to $1$.
Hence, $n \nmid a$. Similarly, $n \nmid b$. Hence proved.
I have assumed $a,b \neq 0$ because $n=ab$ is composite. Please, let me know if it fine. Thanks.

REPLY [3 votes]: Your proof works well.
In the case where all numbers involved are positive, there is a simpler solution (this can also be used if there are negative numbers involved, but whether it is simpler in that case is not so easily determined).
Let $a, b\in \Bbb N$, with $a, b \neq 1, n$ be such that $n = ab$ (which implies $n \mid ab$). Then $a<n$ and $b<n$, so we cannot possibly have $n \mid a$ or $n \mid b$.