why my code generates a wrong answer? I do not understand. Thanks for all.

Input

The first line of the input will contain a single integer N (N ≤ 10000) indicating the number of rounds in the game. Lines 2,3,…,N+1 describe the scores of the two players in the N rounds. Line i+1 contains two integer Si and Ti, the scores of the Player 1 and 2 respectively, in round i. You may assume that 1 ≤ Si ≤ 1000 and 1 ≤ Ti ≤ 1000.

Output

Your output must consist of a single line containing two integers W and L, where W is 1 or 2 and indicates the winner and L is the maximum lead attained by the winner.

Example

Input:

##
5

140 82

89 134

90 110

112 106

88 90

t = int(input())

if 0 <= t <= 10000:

```
max = 0
for i in range(t):
a,b= map(int,input().split())
if abs(a-b) > max:
max = abs(a-b)
if a > b :
l= [1,max]
else:
l= [2,max]
print(l[0],l[1])
```