Problem

Source: Macedonian Mathematical Olympiad 2024 P4

Tags: combinatorics



In two wooden boxes, there are $1994$ and $2024$ marbles, respectively. Spiro and Cvetko play the following game: alternately, each player takes a turn and removes some marbles from one of the boxes, so that the number of removed marbles in that turn is a divisor of the current number of marbles in the other box. The winner of the game is the one after whose turn both boxes are empty. Spiro takes the first turn. Which of the players has a winning strategy?