In proving Any principal ideal domain is a unique factorization domain.
Let $D$ be a principal ideal domain, and let $d$ be a nonzero element of $D$ that is not a unit. Suppose that $d$ cannot be written as a product of irreducible elements. Then $d$ is not irreducible, and so $d=ab$ where neither $a$ nor $b$ is a unit and either $a$ or $b$ cannot be written as a product of irreducible elements.
My question is how can you get "$d$ is not irreducible" from "$d$ cannot be written as a product of irreducible elements"?
Because an irreducible element is a product of irreducible elements (the product having only one factor).