Let $h,\psi$ be continuous strictly increasing functions vanishing at zero. Apply $\psi$ to the sum of the continuous semi-metrics obtained by applying $h$ to the coordinate distances. Assume that this formula defines metrics on the two products being compared. For nonempty compact metric spaces we prove that a common factor cancels from a binary product. For every integer $n\geq2$, isometric $n$th powers have isometric base spaces when the power is defined directly from the $n$ coordinate distances. For $n=2$ and the Euclidean product metric ($p=2$), the result answers Ulam's square problem affirmatively for compact metric spaces. On any prescribed at most countable family, we choose a common sequence of scales. From the rate--distortion functionals at these scales we obtain on each space a unique maximizing measure of full support. Bijections preserving the semi-metrics transport the measures, and the measure on a product with the sum semi-metric is the product of the factor measures. The Laplace transform of the pushforward under the semi-metric matrix map is multiplicative for this product. The proof applies to $\ell^p$ products for finite $p\geq1$ and to products defined by metrical functions without a homogeneity assumption.