#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long TESTS = 1;
  cin >> TESTS;
  while (TESTS--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> a(n);
    for (long long i = 0; i < n; i++) cin >> a[i];
    long long presum[n + 1];
    presum[0] = 0;
    long long ispeak[n];
    memset(ispeak, 0, sizeof(ispeak));
    for (long long i = 1; i < n - 1; i++) {
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) ispeak[i] = 1;
    }
    for (long long i = 0; i < n; i++) presum[i + 1] = presum[i] + ispeak[i];
    long long maxv = 0, mini = 0;
    for (long long i = 0; i < n - k + 1; i++) {
      long long j = i + k - 1;
      long long x = presum[j + 1] - presum[i] - ispeak[j] - ispeak[i];
      if (x > maxv) {
        maxv = x;
        mini = i;
      }
    }
    cout << maxv + 1 << " " << mini + 1 << '\n';
  }
  return 0;
}
