#include <bits/stdc++.h>
using namespace std;
int ara[200005];
int cnt[200005];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    memset(cnt, 0, sizeof(cnt));
    for (int i = 1; i <= n; i++) {
      cin >> ara[i];
    }
    for (int i = 2; i < n; i++) {
      if (ara[i] > ara[i - 1] && ara[i] > ara[i + 1]) {
        cnt[i] = 1;
      }
    }
    for (int i = 1; i <= n; i++) {
      cnt[i] += cnt[i - 1];
    }
    int maxi = 0, l = 1;
    for (int i = 1; i + k - 1 <= n; i++) {
      if (cnt[i + k - 2] - cnt[i] > maxi) {
        maxi = cnt[i + k - 2] - cnt[i];
        l = i;
      }
    }
    cout << maxi + 1 << ' ' << l << endl;
  }
}
