#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7, N = 5e5 + 10;
const double PI = acos(-1);
const long long LINF = LLONG_MAX;
void test() {
  long long n, k;
  cin >> n >> k;
  vector<long long> q(n + 1, 0);
  for (long long i = 0; i < n; i++) {
    cin >> q[i];
  }
  long long arr[n];
  memset(arr, 0, sizeof(arr));
  for (long long i = 1; i < n - 1; i++) {
    if (q[i] > q[i - 1] and q[i] > q[i + 1]) {
      arr[i] = 1;
    }
  }
  long long c = 0;
  for (long long i = 1; i < k - 1; i++) {
    if (arr[i]) {
      c++;
    }
  }
  long long ma = c;
  long long id = 0;
  for (long long i = k; i < n; i++) {
    if (arr[i - 1]) {
      c++;
    }
    if (arr[i - k + 1]) {
      c--;
    }
    if (c > ma) {
      ma = c;
      id = i - k + 1;
    }
  }
  cout << ma + 1 << " " << id + 1 << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long tt = 1;
  cin >> tt;
  for (long long i = 0; i < tt; i++) test();
  return 0;
}
