I request the author/tester to put up an editorial for the problem. Also, the problem statement is not properly written. It should clearly specify that all the square plots must be of the same size.
The problem statement is ambiguous and leads many users to submit a wrong solution. Please correct this and provide an editorial.