Problem

Source: Bundeswettbewerb Mathematik 2015 - Round 2 - #1

Tags: geometry, rectangle, combinatorics



Let $a,b$ be positive even integers. A rectangle with side lengths $a$ and $b$ is split into $a \cdot b$ unit squares. Anja and Bernd take turns and in each turn they color a square that is made of those unit squares. The person that can't color anymore, loses. Anja starts. Find all pairs $(a,b)$, such that she can win for sure. Extension: Solve the problem for positive integers $a,b$ that don't necessarily have to be even. Note: The extension actually was proposed at first. But since this is a homework competition that goes over three months and some cases were weird, the problem was changed to even integers.