text: /*
   * FILE: Jumping_Mario-11764.cpp
   *
   * @author: Md. Arafat Hasan Jenin <Opendoor.Arafat@gmail.com>
   *
   * LINK:
   *
   * Description:
   *
   * DEVELOPMENT HISTORY:
   *       Date        Change          Version     Description
   * --------------------------------------------------------------
   *    21 Feb 2017    New             1.0         AC
   *
   */
  
  
  #include <iostream>
  #include <vector>
  #include <algorithm>
  #include <queue>
  #include <climits>
  #include <cmath>
  #include <cstring>
  #include <cstdio>
  #include <cstdlib>
  #include <iomanip>
  
  #define FileIn(file) freopen("input.txt", "r", stdin)
  #define FileOut(file) freopen("output.txt", "w", stdout)
  #define FOR(i, a, b) for (int i=a; i<=b; i++)
  #define ROF(i, b, a) for (int i=b; i>=a; i--)
  #define REP(i, n) for (int i=0; i<n; i++)
  #define Fill(ar, val) memset(ar, val, sizeof(ar))
  #define uint64 unsigned long long
  #define all(ar) ar.begin(), ar.end()
  #define pb push_back
  
  
  /*****************____________BIT_OPERATIONS____________****************/
  #define bit(n) (1 << (n)) //2^n
  //check ith bit of integer n, 0 or 1
  #define bitchk(n, i) ((n & (1 << i))? 1 : 0)
  #define bit_on(n, i) (n | (1 << i)) //set ith bit ON of the integer n
  #define bit_off(n, i) (n & ~(1 << i)) //set ith bit OFF of the intger n
  //toggle ith bit of integer n, set 0 if 1, set 1 if 0
  #define bit_toggle(n, i) (n ^ ( 1 << i))
  //set ith bit to x (x is bool, 1 or 0) of the integer n
  #define bit_setx(n, x, i) (n ^ ((-x ^ n) & (1 << i)))
  
  
  #define nl cout << endl;
  #define lck cout << "______________" << endl;
  
  typedef long long ll;
  using namespace std;
  
  int main() {
    
      int T, Cs = 0, N, h, l, pre, now;
      cin >> T;
      while(Cs < T){
          cin >> N;
          h =l = 0;
          cin >> pre;
          REP(i, N - 1){
              cin >> now;
              if(now > pre) h++;
              else if(now < pre) l++;
              pre = now;
          }
          cout << "Case " << ++Cs << ": " << h << " " << l << endl;
      }
  
      return 0;
  }
  
  
  