#include <bits/stdc++.h>
using namespace std;
int n, k;
long long a[200013];
int s[200013];
int main() {
  int T;
  cin >> T;
  while (T--) {
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
    memset(s, 0, sizeof(s));
    for (int i = 2; i <= n - 1; i++) {
      s[i] = s[i - 1];
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) s[i]++;
    }
    int l = 1, r = 3, ans = 0, al = 1;
    while (r <= n) {
      if (r - l + 1 <= k) {
        if (s[r - 1] - s[l] > ans) {
          ans = s[r - 1] - s[l];
          al = l;
        }
        r++;
      }
      if (r - l + 1 > k) l++;
    }
    printf("%d %d\n", ans + 1, al);
  }
}
