#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, a, b;
  vector<int> arr;
  cin >> n >> a;
  arr.resize(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  vector<int> peak(n);
  peak[0] = 0;
  int c = 0;
  for (int i = 1; i < n; i++) {
    peak[i] = c;
    if (arr[i - 1] < arr[i] && arr[i] > arr[i + 1]) c++;
  }
  int mx = INT_MIN, id = 0;
  for (int i = a - 1; i < n; i++) {
    int x;
    x = peak[i] - peak[i - (a - 1)];
    if (peak[i - (a - 1)] == (peak[i - (a - 1) + 1] - 1)) x--;
    if (mx < x) {
      mx = peak[i] - peak[i - (a - 1)];
      id = i - (a - 1);
    }
  }
  cout << mx + 1 << " " << id + 1;
}
int main() {
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    solve();
    cout << "\n";
  }
  return 0;
}
