#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    long long arr[n + 5];
    for (int i = 1; i <= n; i++) cin >> arr[i];
    long long peak[n + 5];
    bool flag[n + 5];
    memset(peak, 0, sizeof peak);
    memset(flag, 0, sizeof flag);
    for (int i = 2; i <= n; i++) {
      if (arr[i] > arr[i - 1] && arr[i] > arr[i + 1])
        peak[i] += peak[i - 1] + 1, flag[i] = 1;
      else
        peak[i] += peak[i - 1];
    }
    long long s, part, ans = 0, pos;
    for (int i = 1; i <= n; i++) {
      if (i + k - 1 > n) break;
      s = peak[i + k - 1] - peak[i - 1];
      if (flag[i]) s--;
      if (flag[i + k - 1]) s--;
      part = s + 1;
      if (ans < part) {
        ans = part;
        pos = i;
      }
    }
    cout << ans << " " << pos << endl;
  }
  return 0;
}
