#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int q = 0; q < t; ++q) {
    int n, k;
    cin >> n >> k;
    vector<int> x(n);
    for (int i = 0; i < n; ++i) {
      cin >> x[i];
    }
    vector<int> p(n, 0);
    for (int i = 1; i < n - 1; ++i) {
      if (x[i] > x[i + 1] && x[i] > x[i - 1]) {
        p[i] = p[i - 1] + 1;
      } else {
        p[i] = p[i - 1];
      }
    }
    p[n - 1] = p[n - 2];
    int ans = 0, left = 0;
    for (int l = 0; l + k - 1 < n; ++l) {
      if (p[l + k - 2] - p[l] > ans) {
        ans = p[l + k - 2] - p[l];
        left = l;
      }
    }
    cout << ans + 1 << ' ' << left + 1 << endl;
  }
  return 0;
}
