Let $m_i > 1$, where $1 ≤ i ≤ n$, be integers, pairwise relatively prime. Let $m = m_1 \cdots m_n$. Let $\phi(m)$ denote the order of the group $(Z/mZ)^×$. The function $\phi : Z_+ → Z_+$ is called the Euler phi function. Show that there exists an isomorphism $(Z/mZ)^× → (Z/m_1Z)^× \times \cdots \times (Z/m_nZ)^×$. In particular, $\phi(m) = \phi(m_1) \cdots \phi(m_n)$.
Attempt: the direction is to use Chinese Remainder Theorem, but I am kinda stuck there at the origin. If mi are all primes, then the result would be immediate, simply by definition. Any hints please?