#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> a(n, 0);
    for (int i = 0; i < n; i++) cin >> a[i];
    vector<int> prev(n, 0);
    prev[0] = 0;
    int m = -1;
    int s = 0;
    int l = 0;
    int r = 0;
    for (int i = 1; i < n - 1; i++) {
      if (a[i] > a[i + 1] && a[i - 1] < a[i]) {
        s++;
      }
      prev[i] = s;
    }
    for (int i = n - 1; i >= k - 1; i--) {
      if (prev[i - 1] - prev[i - k + 1] >= m) {
        m = prev[i - 1] - prev[i - k + 1];
        l = i - k + 1;
      }
    }
    cout << m + 1 << " " << l + 1 << endl;
  }
}
