G is the product of its Sylow subgroups
Recall the following criterion:
Criterion. A group $G$ is a direct product if and only if it has two normal subgroups $H,K$ such that $H \cap K = \{1\}$ and $G = HK$.
This criterion gives, by induction
Criterion bis. A group $G$ is a $n$-fold product if and only if it has $n$ normal subgroups $H_1,\ldots,H_n$ such that $G = H_1 \ldots H_n$ and $H_i \cap (H_1 \ldots H_{i-1} H_{i+1} \ldots H_n) = \{1\}$.
In you case you have the Sylow subgroups $P_1,\ldots,P_r$ which are normal by hypothesis. The equality $G = P_1 \ldots P_r$ follows from cardinality considerations, and $P_i \cap (P_1 \ldots \widehat{P_i} \ldots P_n) = \{1\}$ follows from order considerations.
Indeed, you can change the order in the product! In fact, let $g \in G_i$, $h \in G_j$. Then $g h g^{-1} h^{-1} \in G_j \cap G_i$. But $G_j$ is a $p_j$-group and $G_i$ is a $p_i$-group! If an element lies in their intersection, its order must divide both $p_i^n$ and $p_j^m$, hence it is $1$.