#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  cin >> T;
  for (int t = 1; t <= T; t++) {
    int n, k;
    cin >> n >> k;
    vector<int> a(n), p(n, 0);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 1; i < n - 1; i++) {
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) {
        p[i] = 1;
      }
      p[i] += p[i - 1];
    }
    p[n - 1] += p[n - 2];
    int ans = p[k - 2] - p[0], l = 0;
    for (int i = k; i < n; i++) {
      if (ans < (p[i - 1] - p[i - k + 1])) {
        ans = (p[i - 1] - p[i - k + 1]);
        l = i - k + 1;
      }
    }
    cout << ans + 1 << " " << l + 1 << endl;
  }
  return 0;
}
