#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> v(n);
    for (long long &first : v) cin >> first;
    vector<long long> peaks(n);
    for (long long i = 1; i < n - 1; i++) {
      if (v[i] > v[i - 1] && v[i] > v[i + 1]) peaks[i] = 1;
    }
    long long curr = 0;
    pair<long long, long long> mx;
    for (long long i = 1; i < k - 1; i++) {
      curr += peaks[i];
    }
    mx = {curr + 1, 1};
    for (long long i = 2; i <= n - k + 1; i++) {
      curr -= peaks[i - 1];
      curr += peaks[i + k - 3];
      if (curr + 1 > mx.first) {
        mx = {curr + 1, i};
      }
    }
    cout << mx.first << ' ' << mx.second << '\n';
  }
}
