#include <bits/stdc++.h>
#pragma GCC optimize("O3")
const int INF = 1e9;
const int MOD = 1e9 + 7;
const int N = 2 * 1e5;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  while (q--) {
    int n, k, a[N], b[N] = {0}, p[N] = {0};
    cin >> n >> k;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (int i = 2; i < n; i++) {
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) b[i] = 1, p[i] = 1;
    }
    for (int i = 2; i <= n; i++) {
      p[i] += p[i - 1];
    }
    int mx = -INF, ind = 1;
    for (int i = k; i <= n; i++) {
      if (p[i - 1] - p[i - k + 1] > mx) {
        ind = i - k + 1;
        mx = p[i - 1] - p[i - k + 1];
      }
    }
    cout << mx + 1 << " " << ind << "\n";
  }
  return 0;
}
