#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
void solve() {
  long long int n, k;
  cin >> n >> k;
  long long int arr[n + 1];
  for (int i = 0; i < (n); ++i) cin >> arr[i + 1];
  long long int start = 1, end = 3;
  long long int peak = 0;
  long long int l = 1;
  long long int ans = 0;
  while (end <= n) {
    if (end - 2 >= 1 && arr[end - 1] > arr[end - 2] && arr[end - 1] > arr[end])
      peak++;
    if (end - start + 1 > k) {
      start++;
      if (start - 1 >= 1 && arr[start] > arr[start - 1] &&
          arr[start] > arr[start + 1])
        peak--;
    }
    if (ans < peak) {
      ans = peak;
      l = start;
    }
    end++;
  }
  if (k == n) {
    cout << ans + 1 << " ";
    cout << 1 << '\n';
    return;
  }
  cout << ans + 1 << " ";
  cout << l << '\n';
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
