#include <bits/stdc++.h>
using namespace std;
int a[222222];
int c[222222];
int d[222222];
int flag[222222];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int sum = 0;
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      d[i] = 0;
    }
    flag[0] = 0;
    flag[n - 1] = 0;
    for (int j = 1; j < (n - 1); j++) {
      if (a[j] > a[j - 1] && a[j] > a[j + 1])
        flag[j] = 1;
      else
        flag[j] = 0;
    }
    int l = 0, r = 0;
    int max1 = -1;
    int ji = 0;
    for (int r = 1; r < n; r++) {
      if ((r - l) >= k) {
        l++;
        d[l] = d[l - 1];
        if (flag[l] == 1) d[l]--;
      }
      if (flag[r - 1] == 1) d[l]++;
      if (d[l] > max1) {
        max1 = d[l];
        ji = l;
      }
    }
    cout << max1 + 1 << " " << ji + 1;
    if (t != 0) cout << "\n";
  }
  return 0;
}
