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