The Lead Game ,plz tell the mistake ..i am getting the answer right..

#include

using namespace std;

int main()
{
try
{

    int N,i;
    int Si,Ti,temp=0,temp1=0;

    int a[10000];
    for(i=0;i<10000;i++)
    a[i]=0;


    cin>>N;
    if(N>10000||N<=0)
        throw 100;
    for(i=0; i<N; i++)
    {
        cin>>Si;
        cin>>Ti;
        if((Si<1||Si>10000) ||(Ti<1||Ti>10000))
            throw("hey idiot");
        a[i]=Si-Ti;
    }
    for(i=0; i<N; i++)
    {

//player 1//
if(a[i]>0)
{

            if(a[i]>temp)
                temp=a[i];
        }
    }

//player 2//
for(i=0; i<N; i++)
{
if(a[i]<0)
{

            if(a[i]<temp1)
                temp1=a[i];
        }
    }
    if(temp> (-temp1))
        cout<<"1"<<"\t"<<temp;

    else
        cout<<"2"<<"\t"<<(-temp1);
}

catch(int x)
{


}

catch(...)
{

}

}