Problem

Source: Iberoamerican Problem 5

Tags: Divisors, Iberoamerican, combinatorics



Given a positive integer $n$, all of its positive integer divisors are written on a board. Two players $A$ and $B$ play the following game: Each turn, each player colors one of these divisors either red or blue. They may choose whichever color they wish, but they may only color numbers that have not been colored before. The game ends once every number has been colored. $A$ wins if the product of all of the red numbers is a perfect square, or if no number has been colored red, $B$ wins otherwise. If $A$ goes first, determine who has a winning strategy for each $n$.