Prime factorization of element is unique irreducible factorization upto ordering and associates

Statement
Suppose $$R$$ is an integral domain, and $$a \in R$$ is a nonzero non-unit with a factorization into primes:

$$a = up_1p_2 \dots p_r$$

where each $$p_i$$ is a fact about::prime element of $$R$$ and $$u$$ is a unit. Then, given any other factorization of $$a$$ into irreducibles:

$$a = vq_1q_2 \dots q_s$$

where $$v$$ is a unit and $$q_i$$ are fact about::irreducible elements, we have r = s, and there is a permutation $$\sigma$$ of $$\{ 1,2,3, \dots, r \}$$ such that $$p_i$$ and $$q_{\sigma(i)}$$ are fact about::associate elements.