I changed the title (and the body) of this question page, since user26857 provided a nice answer for my original question in a more general setting.
Here's what the accepted answer below provides:
If $m_{1},…,m_{r}$ are distinct maximal ideals of a noetherian integral domain $R$ which is not a field and $m^{e_{1}}_{1}\cdots m^{e_{r}}_{r}=m^{f_{1}}_{1}\cdots m^{f_{r}}_{r}$, then $e_{i}=f_{i}$ for all $i=1,...,r$.
By localizing at $m_i$ we have $m_i^{e_i}R_{m_i}=m_i^{f_i}R_{m_i}$, that is, $(m_iR_{m_i})^{e_i}=(m_iR_{m_i})^{f_i}$, and thus we can reduce the problem to the local case.
Suppose $i<j$. Since $m^i=m^j$ we get $m^i=m^{i+1}$ and by Nakayama $m^i=0$. It follows $m=0$, a contradiction.