Define $\phi: \mathbb{Z}_{nm}^{\times}\to \mathbb{Z}_n^{\times} \times \mathbb{Z}_m^{\times}$ by $\phi( [x]_{nm}) = ( [x]_n, [x]_m)$.