Does everyone know the Mobius Ring? The Mobius Ring is a structure that loops indefinitely. Here shows the picture of it:
Little Gyro is fond of the Mobius Ring. One day, Little Gyro found that Derrick was studying with his girlfriend, so he called another teammate Onlystar for his brand new game which was recently invented. And they were happily playing games on the Mobius Ring.
In this game, there are N positions numbered from 0 to N-1 arranged in a circle(in the clockwise order). Position numbered 0 is a black hole and others are all empty. And there's a huge monster in one of the empty positions. Both Little Gyro and Onlystar don't know the initial position of the monster yet, they only know it's not at the black hole. Before the game starts, the system will inform them of the monster's position randomly. But now, they want to be well prepared for every possible scenario.
At the beginning of the game, each person has a set of numbers between 1 and N-1 (inclusive). Little Gyro's set is named

and contains

elements while Onlystar's is named

and contains

elements. One of them goes first and the players change alternatively. In each player's turn, the player should choose an arbitrary number such as x from his set and then the monster will move to his next x-th position from its current position(also in the clockwise order). If and only if after the move that the monster falls into the black hole, the game ends while the person who makes the last move wins the game.
Given two number sets

,

, for each player goes first, you should determine if the starter wins, loses, or the game will stuck in an infinite loop for every initial position of the monster from 1 to N-1. Please note that, in case a player may lose the game or make the game go infinity, it's more profitable to control the game never end.