#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
const int MAXN = 2e5 + 7;
const int MOD = 1e9 + 7;
const unsigned long long BASE = 311;
const long double EPS = 1e-9;
const int INF = ((1 << 30) - 1);
const long long INFLL = ((1ll << 62ll) - 1ll);
const long long oo = 2e18;
long long ar[MAXN], cnt[MAXN];
bool mk[MAXN];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long T;
  cin >> T;
  while (T--) {
    long long n, k;
    cin >> n >> k;
    for (long long i = 1; i <= n; ++i) {
      cin >> ar[i];
    }
    ar[0] = oo;
    ar[n + 1] = oo;
    for (long long i = 1; i <= n; i++) {
      if (ar[i] > ar[i + 1] && ar[i] > ar[i - 1]) {
        cnt[i]++;
        mk[i] = true;
      }
    }
    long long ans = 0, id;
    for (long long i = n; i >= 1; i--) {
      cnt[i] += cnt[i + 1];
      if (i > n - k + 1) continue;
      if (ans <= cnt[i] - cnt[i + k] - mk[i] - mk[i + k - 1]) {
        ans = cnt[i] - cnt[i + k] - mk[i] - mk[i + k - 1];
        id = i;
      }
    }
    cout << ans + 1 << " " << id;
    cout << "\n";
    for (long long i = 1; i <= n; i++) {
      cnt[i] = 0;
      mk[i] = false;
    }
  }
  return 0;
}
