#include <bits/stdc++.h>
const int N = 2e5 + 3;
using namespace std;
bool isPrime(long long int n) {
  if (n <= 1) return false;
  for (long long int i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
vector<int> v;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    long long int a[n];
    for (int i = 0; i <= n - 1; i++) cin >> a[i];
    vector<int> l(n, 0);
    for (int i = 1; i <= n - 2; i++) {
      if (a[i] > a[i - 1] && a[i] > a[i + 1]) l[i]++;
      l[i] += l[i - 1];
    }
    l[n - 1] = l[n - 2];
    long long int ans = 0, ansx = 0;
    int i = 0, j = k - 1, ma = 0;
    while (j < n) {
      ma = max(ma, l[j - 1] - l[i]);
      j++;
      i++;
    }
    cout << ma + 1 << " ";
    i = 0, j = k - 1;
    int r = 0;
    while (j < n) {
      if (l[j - 1] - l[i] == ma) {
        r = i + 1;
        break;
      }
      i++;
      j++;
    }
    cout << r << endl;
  }
}
