The product of five consecutive positive integers cannot be the square of an integer 
Prove that the product of five consecutive positive integers cannot be the square of an integer.

I don't understand the book's argument below for why $24r-1$ and $24r+5$ can't be one of the five consecutive numbers. Are they saying that since $24-1$ and $24+5$ aren't perfect squares it can't be so? Also, the argument after that about how $24r+4$ is divisible by $6r+1$ and thus is a perfect square is unclear.
Book's solution:


The numbers $24r-1$ and $24r+5$ are also divisible neither by $2$ nor by $3$, so by the previous argument, if they are part of the list they must be perfect squares. However, they are odd and respectively congruent to $-1$ and $5$ modulo $8$. But any odd perfect square must be congruent to $1$ modulo $8$.
