Length dimension in the Lane-Emden equation

I was deriving the Lane-Emden equation from the hydrostatic equation and the polytrope. I was following the procedure presented by Carroll & Ostlie's book. I was stuck on this part, it said that the collective constant

$$\left[(n+1)\left(\dfrac{K \rho_c^{(1-n)/n}}{4\pi G}\right)\right]$$

has the unit of distance squared. I can't understand this because $$n$$ is the polytropic index that changes with respect to the cases.

Could someone explain this why this term has a unit of distance squared?

The constant $$K$$ is defined by the polytropic equation of state

$$P=K\rho^{1+\frac{1}{n}}$$

so $$K$$ has strange dimensions that cancel out the strange dimensions of $$\rho_c^{(1-n)/n}$$.

Since

$$[P]=[M][L]^{-1}[T]^{-2}$$

and

$$[\rho]=[M][L]^{-3}$$

one has

$$[K]=[P]/[\rho]^{1+\frac{1}{n}}=[M]^{-\frac{1}{n}}[L]^{2+\frac{3}{n}}[T]^{-2}.$$

Then, since,

$$[G]=[M]^{-1}[L]^{3}[T]^{-2}$$

one has

$$\left[\frac{K\rho_c^{{(1-n)/n}}}{G}\right]=[L]^2.$$