#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 9;
int a[N + 5];
int cnt[N + 5];
bool mark[N + 5];
int32_t main() {
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      cnt[i] = 0;
      mark[i] = 0;
    }
    for (int i = 1; i < n - 1; i++) {
      if (a[i - 1] < a[i] && a[i] > a[i + 1]) {
        mark[i] = 1;
      }
    }
    for (int i = 1; i < n; i++) cnt[i] = cnt[i - 1] + mark[i];
    int l = 0, parts = 0;
    for (int i = k - 1; i < n; i++) {
      int r = cnt[i] - cnt[i - k + 1] - mark[i] - mark[i - k + 1];
      if (r > parts) {
        parts = r;
        l = i - k + 1;
      }
    }
    cout << parts + 1 << " " << l + 1 << "\n";
  }
  return 0;
}
