Alice and Bob want to go on an adventure. Every day for days, they each move in a compass direction by a certain number of kilometres. Your task is to determine who is further from where they started after days of movement.
Input Format
The first line contains an integer , the number of days.
The next lines each contain two strings for Alice and Bob respectively, each with a direction (one of "N", "S", "E", "W") followed by an integer , the distance in kilometres.
Output Format
Print "Alice" if Alice is further from the origin, "Bob" if Bob is further, or "Tie" if they are equidistant from the origin.
Constraints
Example 1
Input
3
W5 E4
S7 S2
E5 N5
Output
Alice
Alice moves 5km west, 7km south and 5km east, so she ends up 7km from the origin. Bob moves 4km east, 2km south and 5km north, so he ends up 5km from the origin.
Example 2
Input
5
N8 S0
E3 W7
S12 W4
E14 N2
N2 W6
Output
Tie
Comments
easy porblem
problem