The point of a UFD is that any element can be rewritten as a product of irreducible factors, where any other product of irreducible factors is just a rearrangement of the exact same terms, is this correct?
I.e. $f(x)=a_1a_2\cdots a_n$ where $a_i$ are irreducible for all $1\leq i \leq n$.
And if we also have $f(x)=b_1b_2\cdots b_m$ and $f(x)$ is in a UFD, we know that:
1) $m=n$, and
2) These $b_l$ are just a relabelling of the $a_i$
Is that right?