For an explanation, refer to the solution submitted by Ady TZIDON in this location.
Steve Herman writes in response to the counterexample of 40 rooks as follows:
"The counter-example that you requested is having all of the rooks in 4 rows (or having them all in 4 columns). With 40 rooks so placed, no set of 5 rooks can be found that do not attack each other. By the pigeonhole principle, if they are all in 4 rows, then at least two of them must be in the same row."