$n$ is a positive integer, if whenever $n$ divide $ab$, $n$ also divide $a$ or a divide $b$, then n is a prime.

46 Views Asked by At

The title has proved as below, but I don't understand the proof. Assume $n$ is not a prime, then $n$ has nontrivial divisor, $a|n$, $1<a<n$, and then $n = ab$, $1<b<n$, but then $n|ab$, and $n$ not divide $a$ and not divide $b$, contradiction. Any help thanks!