Minimum size of generating set of direct product of groups of coprime order equals maximum of minimum size of generating set of each factor

For two groups
Suppose $$A$$ and $$B$$ are finite groups whose orders are relatively prime to each other, and the minimum size of generating set (i.e., the smallest possible size of a  generating set) of $$A$$ is $$a$$ while the minimum size of generating set of $$B$$ is $$b$$. Then, the minimum size of generating set of the external direct product $$A \times B$$ is equal to $$\max \{ a,b \}$$.

For multiple groups
Suppose $$G_1, G_2, \dots G_n$$ are finite groups whose orders are pairwise relatively prime to each other. Suppose the minimum size of generating set for these groups are $$a_1,a_2,\dots,a_n$$ respectively. Then, the external direct product $$G_1 \times G_2 \times \dots \times G_n$$ has minimum size of generating set is equal to $$\max \{ a_1,a_2,\dots,a_n\}$$.

Related facts

 * Minimum size of generating set of direct product of two groups may be strictly less than sum of minimum size of generating set of each factor
 * Minimum size of generating set of direct product is bounded below by maximum of minimum size of generating set of each factor
 * Minimum size of generating set of direct product is bounded by sum of minimum size of generating set of each factor