Relativistic momentum in pion and muon

So this is from Griffiths particle physics book about pion decaying into neutrino and muon.

The part I have problem with is that it states ` $$\begin{equation} p_{\pi}^2=m_{\pi}^2c^2 , p_{\mu}^2=m_{\mu}^2c^2 \end{equation}$$ as a true statement for the reaction. I am not sure if p means energy-momentum four vector or just momentum. But in any case I do not know how this is true?

Using natural units $$c=1$$ what that relation implies is that the particles are on-shell. Whenever a particle is on-shell you have that, given the particle 4-momentum $$p_\mu$$, $$p_\mu p^\mu \equiv p^2 = m^2$$ where $$m$$ is the particle's mass.
If you put back the velocity of light, you'll get $$p_\mu p^\mu \equiv p^2 = m^2c^4$$
An on-shell particle of mass $$m$$ and velocity $${\bf v}$$ has a four-velocity $$u_\mu = \gamma(c,{\bf v})$$, with $$\gamma=(1-{\bf v}^2/c^2)^{-1/2}$$. Its relativistic momentum $$p_\mu$$ is then given by the expression $$p_\mu = mu_\mu$$. The Lorentz invariant magnitude of $$p_\mu$$ can then be calculated to be $$p^2 \equiv \eta^{\mu\nu} p_\mu p_\nu = (p_0)^2 - (p_1)^2 - (p_2)^2 - (p_3)^2 = m^2c^2,$$ assuming the mostly-negative convention $$\eta^{\mu\nu}={\rm diag}(1,-1,-1,-1)$$.
$$p^2$$ means $$p^\mu p_\mu=p_0^2-p_x^2-p_y^2-p_z^2$$.
Usually, one denotes $$p$$ for the 4-vector, $$\vec{p}$$ for the 3-vector and $$p_i$$ or $$p^\mu$$ for the components.
So this is just the basic $$p^2 = (mc)^2 = \frac{E^2}{c^2}-\vec{p}^2$$ relation that one gets from $$p^\mu = (\frac{E}{c}, \vec{p})$$ and basically defines mass.