#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, k;
    cin >> n >> k;
    vector<long long int> a(n);
    for (auto &itr : a) cin >> itr;
    set<long long int> s;
    long long int peak = 0;
    long long int i = 1;
    while (i < n) {
      if (a[i] == max(a[i], max(a[i - 1], a[i + 1]))) {
        peak++;
        s.insert(i);
        i = i + 2;
      } else
        i++;
    }
    long long int peak1 = 0;
    for (int i = 0; i < k; i++) {
      if (s.count(i) && i != k - 1) {
        peak1++;
      }
    }
    long long int window = peak1;
    long long int max_num;
    long long int j = 0;
    for (int i = k; i < n; i++) {
      if (s.count(i - 1)) window++;
      if (s.count(i - k + 1)) window--;
      max_num = peak1;
      peak1 = max(peak1, window);
      if (peak1 > max_num) {
        j = i - k + 1;
      }
    }
    cout << peak1 + 1 << " " << j + 1 << endl;
  }
}
