# Heaps of marbles

Alice and Bob play the following game with two heaps of $10,000$ and $20,000$ marbles.

• Alice and Bob move alternatingly. Alice makes the first move.
• In every move, the active player may
(i) either remove $x\ge1$ marbles from the first heap,
(ii) or remove $y\ge1$ marbles from the second heap,
(iii) or remove $x\ge1$ marbles from the first heap and $y\ge1$ marbles from the second heap, where $x+y$ is divisible by $2016$.
• The player who takes the last marble wins the game.

Question: Which player is going to win this game?
(As usual, we assume that Alice and Bob both use optimal strategies.)

Alice first takes $9.112$ marbles from the first heap and $19.112$ from the second heap ($9.112 + 19.112 = 28.224 = 2.016 * 14$), leaving 888 marbles on each heap. From that on she just mirrors Bob's move keeping the heaps equal sized, making it impossible for Bob to win.