#include <bits/stdc++.h>
using namespace std;
const int maxN = 200005;
int T, N, K, A[maxN], P[maxN];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin >> T;
  while (T--) {
    cin >> N >> K;
    for (int i = 1; i <= N; ++i) cin >> A[i];
    for (int i = 2; i < N; ++i) {
      P[i] = P[i - 1];
      if (A[i] > A[i - 1] && A[i] > A[i + 1]) ++P[i];
    }
    int mx = 0;
    int l = 0;
    for (int i = 1; i + K - 1 <= N; ++i) {
      int p = P[i + K - 2] - P[i] + 1;
      if (p > mx) {
        mx = p;
        l = i;
      }
    }
    printf("%d %d\n", mx, l);
  }
  return 0;
}
