this is showing runtime error

#include <stdio.h>
#include<math.h>
int main(void) {
int n,s,t,i,w[10000],l[10000],k,max;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d\n",s,t);
if(s>t)
w[i]=1;
else
w[i]=2;
l[i]=abs(s-t);
}max=l[0];
for(i=0;i<n;i++)
{
if(l[i]>max)
max=l[i];
k=i;
}
printf("%d%d",w[k],max);
return 0;
}

because of & not used with s and t and in scanf \n used.
use scanf as
scanf("%d%d",&s,&t);

scanf("%d %d\n",s,t);

this line is giving runtime error.

it should be

scanf("%d %d\n",&s,&t);