#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
long long a[maxn], sum[maxn];
int main() {
  int n, k, t, i, j;
  ios::sync_with_stdio(false);
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      sum[i] = 0;
    }
    for (i = 2; i < n; i++) {
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) {
        sum[i]++;
      }
      sum[i] += sum[i - 1];
    }
    if (a[n - 1] > a[n])
      sum[n] += (sum[n - 1] + 1);
    else
      sum[n] = sum[n - 1];
    long long mx = 0;
    j = 1;
    for (int i = 1; i <= n - k + 1; i++) {
      int t = sum[i + k - 1] - sum[i];
      if (sum[i + k - 2] + 1 == sum[i + k - 1]) t -= 1;
      if (t > mx) {
        mx = t;
        j = i;
      }
    }
    cout << mx + 1 << " " << j << endl;
  }
  return 0;
}
