#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
int main() {
  ios_base::sync_with_stdio("NO");
  cin.tie(NULL);
  int q;
  cin >> q;
  while (q--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> a(n);
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    vector<long long> p(n);
    for (long long i = 1; i < (n - 1); i++) {
      p[i] += p[i - 1];
      if (a[i - 1] < a[i] && a[i] > a[i + 1]) {
        p[i]++;
      }
    }
    p[n - 1] += p[n - 2];
    long long ans = 0, L = 0;
    for (long long l = 0; l <= (n - k); l++) {
      if (ans < (p[l + k - 2] - p[l])) {
        ans = max(ans, p[l + k - 2] - p[l]);
        L = l;
      }
    }
    cout << ans + 1 << " " << L + 1 << "\n";
  }
}
