Second cohomology group for trivial group action commutes with direct product in second coordinate

Statement
Suppose $$G$$ is a group and $$A_1$$ and $$A_2$$ are abelian groups. Let $$H^2(G,A_1)$$, $$H^2(G,A_2)$$, and $$H^2(G,A_1 \times A_2)$$ denote the fact about::second cohomology group for trivial group action for $$G$$ on $$A_1$$, $$A_2$$, and the fact about::external direct product $$A_1 \times A_2$$ respectively. Then, we have the following natural isomorphism:

$$\! H^2(G,A_1 \times A_2) \cong H^2(G,A_1) \times H^2(G,A_2)$$

Related facts

 * Kunneth formula for group cohomology: This tells us how to deal with direct products in the first coordinate.