#include <bits/stdc++.h>
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int t;
  std::cin >> t;
  while (t--) {
    int n, k;
    std::cin >> n >> k;
    std::vector<int> a(n);
    for (int i = 0; i < n; i++) {
      std::cin >> a[i];
    }
    std::vector<bool> is_peak(n);
    for (int i = 1; i + 1 < n; i++) {
      is_peak[i] = a[i] > a[i - 1] && a[i] > a[i + 1];
    }
    int left_border = 1, best_peak_cnt = 0, cur_peak_cnt = 0;
    for (int i = 0; i + 1 < k; i++) {
      if (is_peak[i]) {
        best_peak_cnt++;
        cur_peak_cnt++;
      }
    }
    for (int i = k; i < n; i++) {
      if (is_peak[i - k + 1]) {
        cur_peak_cnt--;
      }
      if (is_peak[i - 1]) {
        cur_peak_cnt++;
      }
      if (cur_peak_cnt > best_peak_cnt) {
        best_peak_cnt = cur_peak_cnt;
        left_border = i - k + 1 + 1;
      }
    }
    std::cout << (best_peak_cnt + 1) << " " << left_border << "\n";
  }
  return 0;
}
