Problem

Source: IMO Shortlist 2023 C1

Tags: IMO Shortlist, combinatorics, AZE IMO TST



Let $m$ and $n$ be positive integers greater than $1$. In each unit square of an $m\times n$ grid lies a coin with its tail side up. A move consists of the following steps. select a $2\times 2$ square in the grid; flip the coins in the top-left and bottom-right unit squares; flip the coin in either the top-right or bottom-left unit square. Determine all pairs $(m,n)$ for which it is possible that every coin shows head-side up after a finite number of moves. Thanasin Nampaisarn, Thailand