#include <bits/stdc++.h>
using namespace std;
long long sl, te, a[200005], t[200005], n, k, kq, vt, x;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> te;
  a[0] = 1e18;
  while (te--) {
    cin >> n >> k;
    a[n + 1] = 1e18;
    for (int i = 1; i <= n; ++i) cin >> a[i];
    for (int i = 1; i <= n; ++i) {
      t[i] = t[i - 1];
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) t[i]++;
    }
    kq = 1;
    vt = 1;
    for (int i = 1; i + k - 1 <= n; ++i) {
      x = i + k - 1;
      sl = t[x] - t[i - 1];
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) sl--;
      if (i != x && a[x] > a[x - 1] && a[x] > a[x + 1]) sl--;
      if (sl + 1 > kq) {
        kq = sl + 1;
        vt = i;
      }
    }
    cout << kq << ' ' << vt << '\n';
  }
  return 0;
}
