#include <bits/stdc++.h>
using namespace std;
int a[200005], b[200005], sum[200005];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, k;
    scanf("%d%d", &n, &k);
    for (int i = 0; i <= n + 1; i++) sum[i] = b[i] = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 2; i < n; i++)
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) b[i] = 1;
    for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + b[i];
    int t = 0, l = 1;
    for (int i = 1; i + k - 1 <= n; i++) {
      int tmp = sum[i + k - 2] - sum[i];
      if (tmp > t) {
        t = tmp;
        l = i;
      }
    }
    printf("%d %d\n", t + 1, l);
  }
  return 0;
}
