#include <bits/stdc++.h>
using namespace std;
long long a[1000009], b[1000009], cs[1000009];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    for (long long i = 0; i <= n; i++) {
      b[i] = 0;
      cs[i] = 0;
    }
    for (long long i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (long long i = 2; i <= n - 1; i++) {
      if (a[i] > a[i - 1] and a[i] > a[i + 1]) {
        b[i] = 1;
      }
      cs[i] = cs[i - 1] + b[i];
    }
    cs[n] = cs[n - 1];
    long long maxpk = 0, fl = 1;
    for (long long i = n; i >= k; i--) {
      long long r = i, l = i - k + 1;
      long long peaks = cs[r - 1] - cs[l];
      if (peaks >= maxpk) {
        maxpk = peaks;
        fl = l;
      }
    }
    cout << maxpk + 1 << " " << fl << '\n';
  }
  return 0;
}
