#include <bits/stdc++.h>
using namespace std;
vector<long long> vec[(long long)1e6];
vector<long long> comp;
long long vis[(long long)1e6];
long long dis[(long long)1e6];
long long a[(long long)1e6];
long long DFS(long long x) {
  vis[x] = true;
  for (long long i = 0; i < vec[x].size(); i++) {
    if (!vis[vec[x][i]]) {
      DFS(vec[x][i]);
    }
  }
  return x;
}
long long power(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return (temp * temp) % ((long long)(1e9 + 7));
  else
    return (x * temp * temp) % (long long)(1e9 + 7);
}
void coding() {
  long long i, j, k, l, m, n, t;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    vector<long long> v(n), V;
    for (int i = 0; i < n; i++) {
      cin >> v[i];
    }
    for (int i = 1; i < n - 1; i++) {
      if (v[i] > v[i - 1] && v[i] > v[i + 1]) V.push_back(i);
    }
    l = 1;
    m = 0;
    for (int i = 0; i < n - k + 1; i++) {
      long long a = upper_bound((V).begin(), (V).end(), i) - V.begin();
      long long b = lower_bound((V).begin(), (V).end(), i + k - 1) - V.begin();
      if (b - a > m) {
        m = b - a;
        l = i + 1;
      }
    }
    cout << m + 1 << " " << l << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cout << fixed << setprecision(11);
  while (t--) {
    coding();
  }
}
