Two magicians named Alice and Bob participate in a challenge. The two participate in a race on a circular track split into
- Alice starts at point
and runs through sectors per second. - Bob starts at point
and runs through sectors per second.
If at any point in the race the distance between the two is less than
- Alice wins if it is possible that sometime during the race, the sum of the shortest distance (running on the circular track) between herself to
and Bob to is prime. - Bob wins if Alice cannot.
In a given scenario, who wins?
Input Specification
The first line of input will contain the integers
The second line of input will contain the integers
The third line of input will contain the integers
Output Specification
Either Alice
or Bob
, identifying the winner.
Constraints
.- At least a turn is executed.
- In case Alice and Bob are on the same segment, Bob is pushed behind Alice.
Sample Input
6 2
2 3
0 1
Sample Output
Alice
Explanation
At the start, the positions of
Comments
When the position is
, why doesn't she win?
Constraints: At least a turn is executed.
I think this means that each person must move once (by
and 
units) before calculamatating whether prime or not.
Then the testcase is weak, I submitted without checking if its the first run and got AC.
Edit: Alice and Bob don't really run in a continuous motion, they teleport
sectors every second.