Let $G_1, G_2, ... , G_n$ be finite cyclic groups. I want to show that $G_1 \times G_2 \times ... \times G_n$ is cyclic if, and only if, $\gcd(|G_i||G_j|) = 1$ whenever $i \ne j$. I do know that if $G$ and $H$ are finite cyclic groups, then $G \times H$ is cyclic if, and only if, $\gcd(|G||H|)=1$. I'm assuming that some form of induction would work when dealing with $n$ finite cyclic groups, but I have absolutely no idea how to apply it.
Any help would be much appreciated.