E. Endgame
time limit per test
3 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
2
2 1
1 2
1 0
0 -1
Output
Bob wins
Input
3
2 3
1 3
-2 1
1 1
1 0
Output
tie 3 2
Input
4
1 1
3 4
0 3
2 0
0 -3
-2 0
Output
Alice wins