Sangxin and Bicycle play games everyday, but no matter what they play, Sangxin always loses. Sangxin found that there is no chance to beat Bicycle even playing dice.
One day, Sangxin came up with a brand new game with stones. In this game there are n piles of stones and m recycling centers, each pile of stones has Ai stones and each recycling center could process exactly Bi (which is pre-assigned) stones at a time. Sangxin and Bicycle operate by turns. Each turn the player must pick one piles of stones and recycle some stones in that pile. Note that they can use recycling centers unlimited times in one turn. The one couldn't do anything during his turn loses.
After thinking a while Sangxin thought the game is too easy and appended a weird rule: After someone's turn if there are no way to completely recycle any pile of stones, he loses immediately.
Now, given the initial state of the game, Sangxin wants to know that who will win. Assume they will play in optimal strategy. The players' name and who will play first is given.