#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first != b.first)
    return a.first > b.first;
  else
    return a.second > b.second;
}
long long ar[1000005], cr[1000005];
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 = 1; i <= n; i++) cin >> ar[i];
    for (long long i = 2; i <= n; i++) {
      if (ar[i] > ar[i - 1] && ar[i] > ar[i + 1] && i + 1 <= n)
        cr[i] = 1;
      else
        cr[i] = 0;
    }
    for (long long i = 2; i <= n; i++) cr[i] += cr[i - 1];
    long long mi = INT_MIN;
    long long index = 0;
    for (long long i = 1; i + k - 2 <= n; i++) {
      long long ans = cr[i + k - 2] - cr[i];
      if (mi < ans) {
        index = i;
        mi = ans;
      }
    }
    cout << mi + 1 << ' ';
    cout << index << "\n";
  }
  return 0;
}
