#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int n, k, cur, l, cnt;
  vector<int> info;
  vector<int> ans;
  for (int i = 0; i < t; i++) {
    cin >> n >> k;
    cnt = 1;
    l = 1;
    info.clear();
    ans.clear();
    for (int j = 0; j < n; j++) {
      cin >> cur;
      info.push_back(cur);
      ans.push_back(0);
    }
    for (int j = 1; j < n - 1; j++) {
      ans[j] = ans[j - 1] + (info[j - 1] < info[j] && info[j + 1] < info[j]);
    }
    for (int j = 0; j < n - k + 1; j++) {
      if (cnt < ans[j + k - 2] - ans[j] + 1) {
        cnt = ans[j + k - 2] - ans[j] + 1;
        l = j + 1;
      }
    }
    cout << cnt << " " << l << '\n';
  }
  return 0;
}
