#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> v(n);
    for (long long i = 0; i < n; i++) cin >> v[i];
    vector<long long> peaks(n, 0);
    for (long long i = 1; i < n - 1; i++) {
      if (v[i] > v[i - 1] && v[i] > v[i + 1]) {
        peaks[i] = 1;
      }
    }
    for (long long i = 1; i < n; i++) {
      peaks[i] = peaks[i] + peaks[i - 1];
    }
    long long ans = 0;
    long long pos = 0;
    for (long long l = 0, r = k - 1; r < n; l++, r++) {
      if (peaks[r - 1] - peaks[l] > ans) {
        ans = peaks[r - 1] - peaks[l];
        pos = l;
      }
    }
    cout << ans + 1 << " " << pos + 1 << endl;
  }
  return 0;
}
