#include <bits/stdc++.h>
using namespace std;
template <typename T>
using pr = pair<T, T>;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) cin >> a[i];
    vector<int> npks(n);
    for (int i = 1; i < n - 1; ++i)
      npks[i] = npks[i - 1] + (a[i] > a[i - 1] and a[i] > a[i + 1]);
    npks[n - 1] = npks[n - 2];
    int max_pk = 0, best_ = 0;
    for (int i = 0; i + k <= n; ++i) {
      int npk_ = npks[i + k - 1];
      if (i > 0) npk_ -= npks[i - 1];
      if (i > 0 and npks[i] > npks[i - 1]) --npk_;
      if (npks[i + k - 1] > npks[i + k - 2]) --npk_;
      if (npk_ > max_pk) max_pk = npk_, best_ = i;
    }
    cout << max_pk + 1 << ' ' << best_ + 1 << endl;
  }
}
