Imagine a factorization domain where all irreducible elements are prime. (We already know the prime elements are irreducible.) Apply Euclid's proof, and the ring becomes a ufd. Conversely, if R is a ufd, let an irreducible element p divide ab. Since the factorization of ab is unique, p appears somewhere in the factors of a or b, hence p divides a or b, and p is prime. A factorization domain is a ufd iff prime and irreducible elements coincide.