#include <bits/stdc++.h>
long long INF = (1ll << 61);
using namespace std;
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int test_casesq;
  cin >> test_casesq;
  for (int t = 0; t < test_casesq; t++) {
    int n, k;
    cin >> n >> k;
    vector<long long> v(n);
    vector<long long> pk(n, 0);
    for (int i = 0; i < n; i++) cin >> v[i];
    for (int i = 1; i < n - 1; i++) {
      if (v[i - 1] < v[i] && v[i] > v[i + 1]) {
        pk[i] = 1;
      }
    }
    int lb = 0;
    partial_sum(pk.begin(), pk.end(), pk.begin());
    long long ans = 0;
    for (int i = 0; i < n - k + 1; i++) {
      long long tmp = pk[i + k - 2] - pk[i];
      if (tmp > ans) {
        ans = tmp;
        lb = i;
      }
    }
    cout << ans + 1 << " " << lb + 1 << '\n';
  }
  return 0;
}
