Direct product is cancellative up to order statistics-equivalence

Statement
Suppose $$G_1, G_2, H_1, H_2$$ are finite groups. Suppose $$G_1$$ and $$H_1$$ are fact about::order statistics-equivalent finite groups, and suppose that the fact about::external direct product $$G_1 \times G_2$$ is order statistics-equivalent to the external direct product $$H_1 \times H_2$$. Then, $$G_2$$ is order statistics-equivalent to $$H_2$$.