#include <bits/stdc++.h>
using namespace std;
int A[201000 + 1], peaks[201000 + 1];
int main(void) {
  int T;
  scanf("%d", &T);
  while (T--) {
    int N, K;
    scanf("%d%d", &N, &K);
    for (int i = 1; i <= N; i++) {
      scanf("%d", &A[i]);
    }
    for (int i = 2; i < N; i++) {
      int val = 0;
      if (A[i] > A[i - 1] && A[i] > A[i + 1]) val = 1;
      peaks[i] = peaks[i - 1] + val;
    }
    int ans = -1, left = -1;
    peaks[N] = peaks[N - 1];
    for (int i = 1; i <= N - K + 1; i++) {
      int val = peaks[i + K - 2] - peaks[i];
      if (val > ans) {
        ans = val;
        left = i;
      }
    }
    printf("%d %d\n", ans + 1, left);
  }
  return 0;
}
