#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 10;
int mount[MAX] = {0}, sum[MAX] = {0};
int n, k, cnt;
int main() {
  int t;
  cin >> t;
  while (t--) {
    scanf("%d%d", &n, &k);
    map<int, int> m;
    for (int i = 0; i < n; i++) scanf("%d", &mount[i]);
    for (int i = 1; i < n - 1; i++) {
      if (mount[i - 1] < mount[i] && mount[i] > mount[i + 1]) {
        m[i] = 1;
      }
    }
    sum[0] = 0;
    for (int i = 1; i < n; i++) {
      if (m[i] == 0) {
        sum[i] = sum[i - 1];
      } else {
        sum[i] = sum[i - 1] + 1;
      }
    }
    int ans1 = 1, ans2 = 1, temp = 0;
    for (int i = 0; i < n; i++) {
      if (i + k > n) break;
      if (sum[i + k - 2] - sum[i] > temp) {
        ans1 = sum[i + k - 2] - sum[i] + 1;
        temp = sum[i + k - 2] - sum[i];
        ans2 = i + 1;
      }
    }
    printf("%d %d\n", ans1, ans2);
  }
  return 0;
}
