#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
int T, n, k, ans, max_num;
int height[MAXN], num[MAXN];
int main() {
  cin >> T;
  while (T--) {
    cin >> n >> k;
    for (int i = 1; i <= n; ++i) {
      cin >> height[i];
      num[i] = 0;
    }
    for (int i = 2; i < n; ++i) {
      if (height[i] > height[i - 1] && height[i] > height[i + 1]) {
        ++num[i];
      }
    }
    for (int i = 2; i <= n; ++i) {
      num[i] += num[i - 1];
    }
    max_num = num[n - 1] - num[n - k + 1];
    ans = n - k + 1;
    for (int i = n - k; i; --i) {
      if (num[i + k - 2] - num[i] >= max_num) {
        max_num = num[i + k - 2] - num[i];
        ans = i;
      }
    }
    cout << max_num + 1 << " " << ans << "\n";
  }
  return 0;
}
