main(n,x,y){ long a=0,b=0; scanf("%d",&n); while(~scanf("%d%d",&x,&y)){ a+=x-y; if(b