#include <stdio.h>
int main ()
{
int n ,i ,a[ 55] ,w ,j ;
scanf ("%d",&n) ;
for (i=1 ; i<=n ;i++)
{
scanf ("%d",&w) ;
for (j=1 ;j <=w ; j++)
{
scanf ("%d",&a[j] ) ;
}
int cnt1 = 0 ,cnt2 =0 ;
for (j=1; j<=w -1 ; j++)
{
if (a [j] < a[j+1] ) cnt1 ++ ;
else if (a [j] > a [j+1] ) cnt2 ++ ;
}
printf ("Case %d: %d %d\n",i ,cnt1 ,cnt2) ;
}
return 0 ;
}
int main ()
{
int n ,i ,a[ 55] ,w ,j ;
scanf ("%d",&n) ;
for (i=1 ; i<=n ;i++)
{
scanf ("%d",&w) ;
for (j=1 ;j <=w ; j++)
{
scanf ("%d",&a[j] ) ;
}
int cnt1 = 0 ,cnt2 =0 ;
for (j=1; j<=w -1 ; j++)
{
if (a [j] < a[j+1] ) cnt1 ++ ;
else if (a [j] > a [j+1] ) cnt2 ++ ;
}
printf ("Case %d: %d %d\n",i ,cnt1 ,cnt2) ;
}
return 0 ;
}