Meisjes zoeken een winnende strategie

Opgave - EMC 2016 dag 1 vraag 2

For two positive integers $a$ and $b$, Ivica and Marica play the following game: Given two piles of $a$ and $b$ cookies, on each turn a player takes $2n$ cookies from one of the piles, of which he eats $n$ and puts $n$ of them on the other pile. Number $n$ is arbitrary in every move. Players take turns alternatively, with Ivica going first. The player who cannot make a move, loses. Assuming both players play perfectly, determine all pairs of numbers $(a, b)$ for which Marica has a winning strategy.