#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, y = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') y = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return x * y;
}
const int N = 200005, inf = 1e9 + 5;
int n, k, p[N], sum[N];
bool ispeak(int x) {
  if (p[x] > p[x - 1] && p[x] > p[x + 1])
    return 1;
  else
    return 0;
}
int main() {
  int t = read();
  while (t--) {
    n = read();
    k = read();
    for (int i = 1; i <= n; i++) sum[i] = 0, p[i] = 0;
    p[0] = p[n + 1] = inf;
    for (int i = 1; i <= n; i++) p[i] = read();
    for (int i = 2; i < n; i++)
      if (ispeak(i)) sum[i]++;
    for (int i = 2; i <= n; i++) sum[i] += sum[i - 1];
    int ans = 0, pos;
    for (int i = 1; i <= n - k + 1; i++) {
      int j = i + k - 1;
      int tmp = sum[j - 1] - sum[i];
      if (tmp + 1 > ans) {
        ans = tmp + 1;
        pos = i;
      }
    }
    printf("%d %d\n", ans, pos);
  }
  return 0;
}
