Problem

Source: Kyiv City MO 2023 Round 1, Problem 10.4

Tags: grid, combinatorics



Positive integers $m, n$ are such that $mn$ is divisible by $9$ but not divisible by $27$. Rectangle $m \times n$ is cut into corners, each consisting of three cells. There are four types of such corners, depending on their orientation; you can see them on the figure below. Could it happen that the number of corners of each type was the exact square of some positive integer? Proposed by Oleksiy Masalitin