I'm working through a QFT problem and at one stage in the solutions we have this step:
$$\delta^{(4)}(p - q_1 - q_2) = \delta(E_1 +E_2 - M)\delta^{(3)}(\bf{q_1} - \bf{q_2}).$$
We are working in the rest frame of a meson with mass $M$ and the process is a decay to a nucleon anti-nucleon pair.
I cannot quite see why we are allowed to split the delta function this way. Can anyone break this down further for me?