2 players r playing a game. They have A bundles of Pencils each of size B. The player who can’t make move loses. For each move, a person choses a bundle and divides into some number(more than 1) of equal bundles. The size of each bundle is integer and is no less than C.

1<=A<=10^5

1<=B,C<=10^9

Example:

A,B,C=4,8,6

Output: 0

A,B,C=1,9,2

Output: 1

Can anyone pls tell me the correct solution?