MathDB
Crying Babies

Source: 2023 Taiwan Mathematics Olympiad

February 24, 2023
Taiwancombinatorics

Problem Statement

Let nn and mm be positive integers. The daycare nanny uses n×mn \times m square floor mats to construct an n×mn \times m rectangular area, with a baby on each of the mats. Each baby initially faces toward one side of the rectangle. When the nanny claps, all babies crawl one mat forward in the direction it is facing at, and then turn 90 degrees clockwise. If a baby crawls outside of the rectangle, it cries. If two babies simultaneously crawl onto the same mat, they bump into each other and cry.
Suppose that it is possible for the nanny to arrange the initial direction of each baby so that, no matter how many times she claps, no baby would cry. Find all possible values of nn and mm.
Proposed by Chu-Lan Kao