#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
int sum[maxn], a[maxn], b[maxn];
int main() {
  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]);
      b[i] = 0;
    }
    for (int i = 2; i < n; i++) {
      sum[i] = sum[i - 1];
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) {
        sum[i]++;
      }
    }
    int mx = 0, pos = 1;
    for (int i = 1; i + k - 1 <= n; i++) {
      int l = i + 1, r = i + k - 1 - 1;
      if (sum[r] - sum[l - 1] > mx) {
        mx = sum[r] - sum[l - 1];
        pos = l - 1;
      }
    }
    printf("%d %d\n", mx + 1, pos);
  }
  return 0;
}
