#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) cin >> a[i];
  int ans = 0, ind = 0;
  int curr = 0;
  for (int i = 2; i < k; i++) {
    if (a[i] > a[i - 1] && a[i] > a[i + 1]) curr++;
  }
  ans = curr, ind = 1;
  for (int i = 2; i + k - 1 <= n; i++) {
    if (a[i] > a[i - 1] && a[i] > a[i + 1]) curr--;
    int j = i + k - 1;
    if (a[j - 1] > a[j] && a[j - 1] > a[j - 2]) curr++;
    if (curr > ans) {
      ans = curr;
      ind = i;
    }
  }
  cout << ans + 1 << " " << ind << "\n";
}
int main() {
  fast();
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
