A unique factorization domain (UFD) is defined to be an integral domain where each element other than units and zero has a factorization into irreducibles, and if we have two such factorizations then they are of the same length (the sum of the powers of the irreducible factors) and the irreducibles involved are associated to each other.
My knowledge about algebra is extremely limited, but the only non-UFD integral domain I have seen is $\mathbb{Z}[\sqrt{-5}]$, where one shows $9=3\cdot 3=(2+\sqrt{-5})(2-\sqrt{-5})$ gives two different factorizations of $9$ into irreducibles with non-associated factors.
However in this case the two factorizations are of the same length.
So just curious, can we find integral domains where some elements have factorizations into irreducibles with different lengths?
Thanks!