In a similar fashion we can define the CoM coordinate
$$
\boldsymbol{R}=\frac{1}{A}\sum_{i=1}^{A}\boldsymbol{r}_i,
$$
which yields
$$
\sum_{i=1}^A\boldsymbol{r}_i^2 =
\frac{1}{A}\left[A^2\boldsymbol{R}^2+\sum_{i < j}(\boldsymbol{r}_i-\boldsymbol{r}_j)^2\right].
$$