#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    long long a[n];
    for (int i = 0, ggdem = n; i < ggdem; ++i) cin >> a[i];
    long long b[n];
    memset((b), (0), sizeof(b));
    for (int i = 0, ggdem = n; i < ggdem; ++i) {
      if (i - 1 >= 0 && i + 1 < n) {
        b[i] = (a[i - 1] < a[i]) && (a[i] > a[i + 1]);
      }
    }
    long long sump[n + 1];
    sump[0] = 0;
    for (int i = 0, ggdem = n; i < ggdem; ++i) sump[i + 1] = sump[i] + b[i];
    long long res = 0, l = 0;
    for (int i = 0, ggdem = n - k + 1; i < ggdem; ++i) {
      if (sump[i + k - 1] - sump[i + 1] > res) {
        res = sump[i + k - 1] - sump[i + 1];
        l = i;
      }
    }
    cout << res + 1 << " " << l + 1 << "\n";
  }
  return 0;
}
