Why doesn't the Chinese remainder theorem contradict the Fundamental Theorem of Finitely Generated Abelian Groups? I am finding a contradiction between those two theorems and I do not know what I am doing wrong. First theorem is:

The group $\Bbb Z_{m_1} \times \Bbb Z_{m_2} \times \dotsm \times \Bbb Z_{m_n}$ is cyclic and isomorphic to $\Bbb Z_{m_1 m_2 \dotsm m_n}$ if and only if any of $m_i$'s are relatively prime.

And the second theorem is the Fundamental Theorem of Finitely Generated Abelian Groups, which says:

Every finitely generated abelian group $G$ is isomorphic to a direct product of cyclic groups of the form $\Bbb Z_{p_1^{k_1}} \times \Bbb Z_{p_2^{k_2}} \times \dotsm \times \Bbb Z_{p_n^{k_n}}$ where $p_i$'s are not necessarily distinct primes.

For example, by the second theorem, we have $\Bbb Z_{360}$ is isomorphic to  $\Bbb Z_2 \times \Bbb Z_2 \times \Bbb Z_2 \times \Bbb Z_3 \times \Bbb Z_3 \times \Bbb Z_5$, but by the first theorem, it should not be, since $2$ and $2$ are not relatively prime. What am I doing wrong here?
Thanks
 A: The fundamental theorem of finitely generated abelian groups does not say that you can split up $360$ in any way you want as a product of primes and obtain an isomorphism. It says that for any abelian group of order $360$, there is a way to write $360$ as a product of prime powers $360=p_1^{r_1}\cdot\cdots \cdot p_n^{r_n}$ such that $G\cong \mathbb Z_{p_1^{r_1}}\times Z_{p_n^{r_n}}$. 
A: The first theorem gives you that if a group is cyclic, it may be factored into a direct product of cyclic groups of relatively prime order, whereas the second theorem gives you that if a finite group is abelian, it is isomorphic to some direct product of cyclic groups.  $\mathbb{Z}_{360}$ is not isomorphic to $\mathbb{Z}_2\times \mathbb{Z}_2\times \mathbb{Z}_2\times \mathbb{Z}_3\times\mathbb{Z}_3\times\mathbb{Z}_5$, but it is isomorphic to $\mathbb{Z}_8\times \times \mathbb{Z}_9\times\mathbb{Z}_5$.  You can factor out relatively prime numbers, e.g. $\mathbb{Z}_{pq}\cong\mathbb{Z}_p\mathbb{Z}_q$ when $p\not= q$ and $p,q$ are prime, but you can't decompose numbers which aren't relatively prime, e.g. $\mathbb{Z}_8\not\cong\mathbb{Z}_2\times \mathbb{Z}_2\times \mathbb{Z}_2$.
A: You are misinterpreting the 2nd theorem. ${\bf Z}_{360}$ is isomorphic to ${\bf Z}_8\times{\bf Z}_9\times{\bf Z}_5$. Note that, for example, ${\bf Z}_4$ is not isomorphic to ${\bf Z}_2\times{\bf Z}_2$. 
