#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 9;
const long long INF1 = 1e18 + 19;
const long long MAXN = 1e6 + 7;
const long long MAXN1 = 300;
const long long MAXN2 = (1 << 24) + 7;
const long long MOD = 1e9 + 7;
const long long PW = 31;
const long long BLOCK = 317;
void solve();
mt19937_64 mt(1e9 + 7);
signed main() {
  srand('a' + 'l' + 'e' + 'x' + 'X' + '5' + '1' + '2');
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  if (1) cin >> q;
  while (q--) {
    solve();
  }
}
bool pick(int i, vector<int>& v, int l, int r) {
  if (i == l || i == r) return 0;
  return v[i - 1] < v[i] && v[i] > v[i + 1];
}
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> v(n);
  for (auto& i : v) cin >> i;
  int ans = -1, l = -1, r = -1, now = 0;
  for (int i = 1; i + 1 < k; ++i) {
    if (pick(i, v, 0, k - 1)) ++now;
  }
  ans = now + 1, l = 0, r = k - 1;
  for (int i = k; i < n; ++i) {
    if (pick(i - k + 1, v, i - k, i - 1)) --now;
    if (pick(i - 1, v, i - k + 1, i)) ++now;
    if (now + 1 > ans) {
      ans = now + 1;
      l = i - k + 1;
      r = i;
    }
  }
  cout << ans << " " << l + 1 << "\n";
}
