Problem

Source: Czech-Polish-Slovak Match, 2010

Tags: geometry, rectangle, calculus, linear algebra, matrix, analytic geometry, number theory



Let $p$ be a prime number. Prove that from a $p^2\times p^2$ array of squares, we can select $p^3$ of the squares such that the centers of any four of the selected squares are not the vertices of a rectangle with sides parallel to the edges of the array.