Problem

Source:

Tags: game



Andrej and Barbara play the following game with two strips of newspaper of length $a$ and $b$. They alternately cut from any end of any of the strips a piece of length $d$. The player who cannot cut such a piece loses the game. Andrej allows Barbara to start the game. Find out how the lengths of the strips determine the winner.