#45788: PHYTHON簡單解


henryko (henry)


T=int(input())
for i in range(T):
    N=int(input())
    seq=list(map(int,input().split()))
    low,high=0,0
    for j in range(1,len(seq)):
        if seq[j-1]>seq[j]:
            low+=1
        elif seq[j-1]<seq[j]:
            high+=1
    print(f"Case {i+1}: {high} {low}")