#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, k, i, j;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    vector<long long int> a(n);
    for (i = 0; i < n; i++) cin >> a[i];
    long long int sum = 0, maxindex, count = 0;
    for (i = 1; i < k - 1; i++) {
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) count++;
    }
    sum = count, maxindex = 0, i = 1;
    for (j = k - 1; j < n - 1; j++) {
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) count--;
      if (a[j] > a[j - 1] && a[j] > a[j + 1]) count++;
      if (count > sum) sum = count, maxindex = i;
      i++;
    }
    cout << sum + 1 << " " << maxindex + 1 << "\n";
  }
}
