#include <stdio.h>
#include<stdlib.h>
int main()
{
int t,a,b,lead=-1,w=1,i;
scanf("%d",&t);
for(i=0;i<t;i++)
{
scanf("%d %d",&a,&b);
if(lead<abs(a-b))
{
lead=a-b;
if(lead>0)
{
w=1;
}
else
{
lead=abs(lead);
w=2;
}
}
}
printf("%d %d",w,lead);
return 0;
}
can anyone tell whats wrong with the code… its showing wrong answer on submission