#include <bits/stdc++.h>
#pragma optimize("Ofast")
using namespace std;
unsigned int start = clock();
using ll = unsigned long long;
struct obj {
  int fi, se;
  obj() { fi = se = 0; }
};
void gettime(string s) {
  cout << endl << s << (clock() - start) / 1000000.0 << endl;
}
void insert() {}
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> pref(n, 0);
  for (int i = 1; i < n - 1; i++) {
    pref[i] = pref[i - 1] + (a[i - 1] < a[i] && a[i] > a[i + 1] ? 1 : 0);
  }
  pref[n - 1] = pref[n - 2];
  int l = 0;
  int ans = pref[k - 2];
  for (int i = k - 1; i < n; i++) {
    if (ans < pref[i - 1] - pref[i - k + 1]) {
      ans = pref[i - 1] - pref[i - k + 1];
      l = i - k + 1;
    }
  }
  cout << ans + 1 << ' ' << l + 1 << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int q = 1;
  cin >> q;
  while (q--) {
    solve();
  }
}
