#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int copyN = n;
    vector<int> num = {};
    vector<int> peaks = {};
    vector<int> sumPeaks = {};
    while (n--) {
      int tmp;
      cin >> tmp;
      num.push_back(tmp);
    }
    for (int j = 0; j < copyN; ++j) {
      if (num[j] > num[j - 1] && num[j] > num[j + 1]) {
        peaks.push_back(1);
      } else {
        peaks.push_back(0);
      }
    }
    int curPeaks = 0;
    for (int i = 1; i < k - 1; ++i) {
      curPeaks += peaks[i];
    }
    pair<int, int> ans = {1, curPeaks};
    int left = 1;
    while (left <= copyN - k) {
      if (peaks[left] == 1) {
        curPeaks--;
      }
      if (peaks[left + k - 2] == 1) {
        curPeaks++;
      }
      if (curPeaks > ans.second) {
        ans = {left + 1, curPeaks};
      }
      left++;
    }
    cout << ans.second + 1 << " " << ans.first << "\n";
  }
}
