#include

using namespace std;

int main() {int n,a,b,lead[100],playera=0,playerb=0,sum=0;

cin>>n;

for(int i=0;i<n;i++)

{cin>>a>>b;

if(a>b)

{playera++;

lead[i]=a-b;

}

if(b>a)

{playerb++;

lead[i]=b-a;

}

}

for(int i=0;i<n;i++)

{

if(lead[i]>=sum)

sum=lead[i];}

if(playera>playerb)

cout<<1;

else

cout<<2;

cout<<" "<<sum;

```
// your code goes here
return 0;
```

}