#include
int main()
{
int i,j,m,n,a[100000];
int x,y;
int maxsum,sum,l0,l1;
scanf("%d",&n);
for(i=0;i
scanf("%d",&m);
for(j=0;j
maxsum=a[0];
y=l0=l1=1;
sum=a[0];
for(x=1;x
if(sum>=0)
sum+=a[x];
else
{
y=x+1;
sum=a[x];
}
if(sum>maxsum)
{
maxsum=sum;
l0=y;
l1=x+1;
}
}
printf("Case %d:\n%d %d %d\n",i+1,maxsum,l0,l1);
if(i
}
return 0;
}