Proof of $\prod_\limits{i=1}^{n}G_i$ is cyclic iff $\gcd(\operatorname{ord} G_i,\operatorname{ord} G_j)=1$ 
Proposition: Let $G_1,\dots,G_n$ be finite groups. Then $G_1\times\dots\times G_n$ is cyclic iff $G_1,\dots,G_n$ are cyclic and $\gcd(\operatorname{ord} G_i,\operatorname{ord} G_j)=1$ if $i\neq j$.

I have no idea on how to prove this proposition. I know and I have proved that the order of $(a_1,\dots,a_n)\in \prod_\limits{i=1}^{n}G_i$ least common multiple of $(\operatorname{ord}(a_1),\dots,\operatorname{ord}(a_n))$. What strikes me here is that we demand $\gcd(\operatorname{ord} G_i,\operatorname{ord} G_j)=1$, and I do not understand why.
Terminology: $\operatorname{ord}$ stands for the "order" and $\gcd$ for greatest common divisor.
Question: How can I prove the proposition?
 A: A group $G$ is cyclic if and only if $G\cong \mathbb{Z}_k$ for some natural $k$.
The proof goes by induction. 
The base case where $k=1$ is trivial.
The real work is the case $k=2$. That's it, $\mathbb{Z}_p\times \mathbb{Z}_q\cong\mathbb{Z}_{pq}$ if and only if (p,q)=1.
If we interpret $\mathbb{Z}_p\times \mathbb{Z}_q\cong\mathbb{Z}_{pq}$ as $\mathbb{Z}_p\times \mathbb{Z}_q$ is cyclic, in which case the generator will be $(1,1)$. This is equivalente that for all $(x,y)\in\mathbb{Z}_p\times \mathbb{Z}_q$, exists $t\in\mathbb{Z}$, such that $t(1,1)=(x,y)$. Which means that the system 
$\begin{align}t\equiv x \mod p\\
t \equiv y \mod q
\end{align}$
has solution for all $(x,y)\in\mathbb{Z}_p\times \mathbb{Z}_q$, an this happens  if and only if $(q,p)=1$.
A: $\Longleftarrow$ If $G_i$ is cyclic then $G_i\cong \mathbb{Z}_{n_i},$ so the condiction is equivalent to $1=(n_i,n_j)$ for all $i\neq j,$ then writting 
$G\cong \mathbb{Z}_{n_1}\times\mathbb{Z}_{n_2}\times\mathbb{Z}_{n_3}$ (the same idea if you take more than three) then $\mathbb{Z}_{n_1}\times\mathbb{Z}_{n_2}\cong\mathbb{Z}_{n_1n_2}$ which is cyclic by Chinesse theorem and $(n_1n_2,n_3)=1$ because $(n_1,n_2)=(n_2,n_3)=(n_1,n_3)=1$
then $G\cong\mathbb{Z}_{n_1n_2n_3}$ which is in fact cyclic.
\ 
$\Longrightarrow$ Suppose that $G=\mathbb{Z}_{n_1}\times\mathbb{Z}_{n_2}\times\dots\times\mathbb{Z}_{n_m}$ and that $(n_1,n_2)=d$ where $d\neq 1,$ then $H=\mathbb{Z}_{n_1}\times\mathbb{Z}_{n_2}$ is not cyclic, because the order of $H$ is $n_1\times n_2$ but any element in $H$ has order $d<n_1\times n_2.$
Therefore $G$ has to be a non-cyclic group.   
