#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  vector<long long> p(n, 0);
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 1; i < n - 1; i++)
    if (a[i] > a[i - 1] && a[i] > a[i + 1]) p[i] = 1;
  vector<long long> sum(n, 0);
  for (long long i = 1; i < k - 1; i++) sum[0] += p[i];
  for (long long i = 2; i < n - k + 2; i++)
    sum[i - 1] = sum[i - 2] + p[i - 3 + k] - p[i - 1];
  long long ma = *max_element(sum.begin(), sum.end());
  cout << ma + 1 << " ";
  for (long long i = 0; i < n; i++) {
    if (sum[i] == ma) {
      cout << i + 1 << endl;
      break;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
