The $G_i$ are groups, I suppose? And $|\cdot|$ denotes the order of an element? Hint: If $a_i$ has finite order $o_i$ for each $i$, what can you say about $(a_1,\ldots, a_n)^{o_1\cdots o_n}$?
–
martiniMay 3 '12 at 6:44

Set $a=(a_1,\cdots,a_n)$ to be an arbitrary element of $H=\bigoplus_i G_i$ and $e=(e_1,\cdots,e_n)$ the identity. Note that each $e_i$ is the identity of the direct summand $G_i$. Now some thoughts to ponder:

$a^m=e$ is true if and only if $a_i^m=e_i$ for each $i=1,2,\cdots,n$.

$a_i^m=e_i$ is true if and only if the order of $a_i$ (in $G_i$) divides $m$ or $a_i=e_i$.

If the order of every $a_i$ divides $m$, then $a_i^m=e_i$ for each $i$.

An element of $a\in H$ for which $a^m=e$ for some $m\in\Bbb Z$ must have finite order. (Why?)

There is an $m\in\Bbb Z$ that is divisible by each $a_i$'s order. (Multiply, take the LCM, etc.)

If each $a_i$ has finite order, the above reasoning tells us $a$ has finite order too. Now, suppose at least one of the $a_i$'s has infinite order. Can $a\in H$ have finite order? (Assume it does and see what happens...)

Finally, there are precisely $n$ conditions on the table: whether or not $a_i$ has finite order, separately for each $i$. What is sufficient for $a$ to have infinite order, in terms of the $a_i$'s orders? And then what is necessary for $a$ to have infinite order? So then what can we say is both necessary and sufficient?