#include <bits/stdc++.h>
const int N = 2e5 + 100;
using namespace std;
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
void bin(unsigned n) {
  unsigned i;
  for (i = 1 << 31; i > 0; i = i / 2) (n & i) ? printf("1") : printf("0");
}
void solve() {
  int n, k, index = 1, cnt = 0, m = 0;
  cin >> n >> k;
  int a[N], p[N];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i >= 2 && a[i - 2] < a[i - 1] && a[i] < a[i - 1]) cnt++;
    p[i] = cnt;
  }
  for (int i = 0; i + k - 1 < n; i++) {
    if (m < p[i + k - 1] - p[i + 1]) index = i + 1;
    m = max(m, p[i + k - 1] - p[i + 1]);
  }
  cout << m + 1 << ' ' << index << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
