can you tell me whats wrong with my code

l = 0
m = 0
for i in range(int(input())):
(x,y) = map(int, input().split(" "))
if l<x-y:
l=x-y
m=1
elif l<y-x:
l=y-x
m=2
print(m,l)

above given is my code. its giving right output but while submitting its call wrong answer
can you please help me with that