PROBLEM CODE: TLG BEGINNER
#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
int main()
{
int rounds,resa =0,resb =0;
cin>>rounds;
while(rounds>0)
{
long long int player1, player2;
cin>>player1>>player2;
if(player1>player2)
{int a = player1- player2;
resa = max( resa, a);
}
else{
int b = player2 - player1;
resb = max(resb, b);
}
rounds--;
}
if(resa>resb){cout<<1<< " "<< resa;}
else{ cout<<2<< " " <<resb;}
}