Gahui and Seoul Subway Line 2
Time limit1sMemory limit512 MB
For each query, the task compares when inner and outer circle trains leaving station a arrive at station b on the circular Line 2 and reports the faster direction.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Seoul Subway Line 2 has three lines. Trains on the circular line run in either the inner circle direction or the outer circle direction.
- Main line
- This is the circular line.
- It has 43 stations, numbered from to .
- Sinjeongji branch (Sindorim to Kkachisan)
- Seongsu branch (Seongsu to Sinseol-dong)
The adjacent stations for inner circle trains are as follows.
- The station adjacent to station is station .
- The station adjacent to station is station . (where )
The adjacent stations for outer circle trains are as follows.
- The station adjacent to station is station .
- The station adjacent to station is station . (where )
Gahui wants to travel from station to station using only Line 2. An inner circle train and an outer circle train have just arrived at station at the same time. Which direction is faster? Tell Gahui which direction's train gets there sooner. The travel time between adjacent stations and the dwell time at each station are the same for all stations, and every train departs from and arrives at every station exactly on schedule.
Input
The first line contains the number of queries .
Each of the next lines contains and , separated by a space.
Output
Print the answer to each query on its own line.
- If the inner circle train is faster, print
Inner circle line. - If the outer circle train is faster, print
Outer circle line. - If both take the same time, print
Same.
Constraints
- Trains on the main line do not pass through any other line.