#include <stdio.h> int main() { int c, z = 0, y, i, l, u, s, d; scanf("%d", &c); for(; z < c; ++z) { scanf("%d", &i); s = 0; scanf("%d", &l); for(y = 0; y < 14; ++y) { scanf("%d", &u); d = u - l; l = u; if(d == 1) ++s; } printf("%d %d\n", i, s); } return 0; }