TITLE: Unique prime ideal factorization in noetherian domains?
QUESTION [7 upvotes]: [I changed the title and the body of the question. Below I explain why I did so, and paste the previous version.]
Let (UPIF) (for "Unique Prime Ideal Factorization") be the following condition on a noetherian domain $A$:

If $\mathfrak p_1,\dots,\mathfrak p_k$ are distinct nonzero prime ideals of $A$, and if $m$ and $n$ are distinct elements of $\mathbb N^k$, then we have $$\mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}\ne\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}.$$

The main question is 

Do all noetherian domains satisfy (UPIF)?

Of course Dedekind domains satisfy (UPIF), but other noetherian domains $A$ also do. Indeed, as noted by user26857, if each nonzero prime ideal of $A$ is invertible or maximal, then $A$ satisfies (UPIF). To see this, assume by contradiction 
$$
\mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}=\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}.$$ 
We can also assume that all the $\mathfrak p_i$ are maximal, and that $m_1>n_1$. Then $\mathfrak p_1^{m_1}$ contains $\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}$ but doesn't contain $\mathfrak p_1^{n_1}$. As $\mathfrak p_1^{m_1}$ is primary, this implies that the radical $\mathfrak p_1$ of $\mathfrak p_1^{m_1}$ contains $\mathfrak p_2^{n_2}\cdots\mathfrak p_k^{n_k}$, and thus $\mathfrak p_1$ contains one of the other $\mathfrak p_i$, contradiction. In particular, one dimensional noetherian domains and domains of the form $B[X]$, $B$ principal ideal domain, $X$ an indeterminate, satisfy (UPIF).

Here are the reasons why I changed the title and the body of the question (and added the "noetherian" tag): user26857 answered the original question in a comment, but didn't want to upgrade his comment to an answer. If they had, I would have accepted the answer and asked a follow-up question, but I thought it would be better, under the circumstances, to avoid creating a new question.

Here is the previous version of the question:
Previous title: Unique non-idempotent prime ideal factorization in domains?
Previous question:

Let $A$ be a domain; let $\mathfrak p_1,\dots,\mathfrak p_k$ be distinct non-idempotent prime ideals of $A$; and let $m$ and $n$ be elements of $\mathbb N^k$ such that $$\mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}=\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}.$$ Does it follow that $m=n\ ?$

[Recall that a domain is a commutative ring with one in which $0\ne1$ and $a\ne0\ne b$ implies $ab\ne0$.]
I suspect the answer is No, but I haven't been able to find a counterexample.
Edit
(1) If $A$ is a noetherian domain, then $(0)$ is the only idempotent prime ideal of $A$.
(2) Say that a domain satisfies Condition (D) (for "Dedekind") if the multiplicative monoid generated by the non-idempotent prime ideals is free (over the obvious basis). 
Then the above question can be stated as: "do all domains satisfy (D)?"
Of course Dedekind domains satisfy (D), I but I know no non-Dedekind domain satisfying (D). (And, as indicated, I know no domain not satisfying (D).) For instance I'd be happy to know if $K[X,Y]$ satisfies (D). (Here $K$ is a field and $X$ and $Y$ are indeterminates.)

REPLY [2 votes]: As user26857 answered the question in a comment, and prefers not to post it as an answer, I'll try to write the answer myself. I think I've understood user26857's argument, but I may be wrong. So, in the lines below, everything that's true is due to user26857, and everything that's false is due to me.

The answer is Yes.

More precisely:

If $A$ is a noetherian integral domain, if $\mathfrak p_1,\dots,\mathfrak p_k$ are distinct nonzero prime ideals of $A$, and if $m$ and $n$ are distinct elements of $\mathbb N^k$, then we have $$\mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}\ne\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}.$$

Proof. In the setting of the question, suppose by contradiction that we have 
$$
\mathfrak p_1^{m_1}\cdots\mathfrak p_k^{m_k}=\mathfrak p_1^{n_1}\cdots\mathfrak p_k^{n_k}
$$ 
with $m\ne n$.
Enumerate the $\mathfrak p_i$ in such a way that each $\mathfrak p_i$ is a minimal element of the set $\{\mathfrak p_i,\dots,\mathfrak p_k\}$, and write $\mathfrak p_{ij}$ for the localization of $\mathfrak p_i$ at $\mathfrak p_j$. 
For all $i$ we get 
$$
(\mathfrak p_{1i})^{m_1}\cdots(\mathfrak p_{ii})^{m_i}=(\mathfrak p_{1i})^{n_1}\cdots(\mathfrak p_{ii})^{n_i}.\quad(1)
$$ 
Note the following consequence of the determinant trick, or Nakayama's Lemma: 
$(2)$ If $\mathfrak a$ and $\mathfrak b$ are ideals of $A$, then the equality $\mathfrak a\mathfrak b=\mathfrak b$ holds only if $\mathfrak a=(1)$ or $\mathfrak b=(0)$. 
Let's prove $m_i=n_i$ by induction on $i$:
Case $i=1$: We have $(\mathfrak p_{11})^{m_1}=(\mathfrak p_{11})^{n_1}$ by $(1)$. If we had $m_1\ne n_1$ we could assume $m_1<n_1$, and would get 
$$
(\mathfrak p_{11})^{n_1-m_1}(\mathfrak p_{11})^{m_1}=(\mathfrak p_{11})^{m_1},
$$ 
contradicting $(2)$.
From $i-1$ to $i$: We have 
$$
(\mathfrak p_{1i})^{m_1}\cdots(\mathfrak p_{i-1,i})^{m_{i-1}}(\mathfrak p_{ii})^{m_i}=(\mathfrak p_{1i})^{m_1}\cdots(\mathfrak p_{i-1,i})^{m_{i-1}}(\mathfrak p_{ii})^{n_i}.\quad(3)
$$ 
If we had $m_i\ne n_i$ we could assume $m_i<n_i$ and we could write $(3)$ as 
$$
(\mathfrak p_{ii})^{n_i-m_i}\mathfrak b=\mathfrak b
$$ 
with $(\mathfrak p_{1i})^{n_i-m_i}\ne(1)$ and $\mathfrak b\ne(0)$, contradicting $(2)$. (Here $\mathfrak b$ is the left side of $(3)$, and we assume $2\le i\le k$.) $\square$
Note that the argument still works if $A$ is not noetherian, but the $\mathfrak p_i$ are finitely generated.