Kunneth formula for group cohomology

For trivial group action
Suppose $$G_1,G_2$$ are groups and $$M$$ is an abelian group. We have the following formula for the cohomology groups for trivial group action of $$G_1 \times G_2$$ on $$M$$ in terms of the cohomology groups for trivial group action of $$G_1$$ and $$G_2$$ respectively on $$M$$:

$$H^p(G_1 \times G_2; M) \cong \left(\sum_{i+j = p} H^i(G_1;M) \otimes H^j(G_2;M) \right) \oplus \left(\sum_{u + v = p + 1} \operatorname{Tor}^1_{\mathbb{Z}}(H^u(G_1;M),H^v(G_2;M))\right)$$

Related facts

 * Kunneth formula for group homology
 * Cohomology group for trivial group action commutes with direct product in second coordinate