The statement is: Let $q$ be an integer. Suppose that $q \geq 2$, and that for any integers $a$ and $b$, if $q|ab$ then $q|a$ or $q|b$. Prove that $q$ is a prime number. This is my proof:
Suppose $q$ is not prime. Then there exist integers $n$ and $k$ such that $q = nk$, satisfying $1 < n, k < q$. Now $q|q$ holds. Thus $q|nk$ By hypothesis, $q|n$ of $q|k$. In either case, we get a contradiction because $n, k < q$. Therefore $q$ is prime.
My friend gave me the numbers $q = 20$ and $ab = 4000$. It seems to be a counterexample. Any explanation would be appreciated.