#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int inf = 1e9;
const long long INF = 1LL << 60;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < (int)(t); i++) {
    int n, k;
    cin >> n >> k;
    int a[n];
    for (int i = 0; i < (int)(n); i++) cin >> a[i];
    int p[n];
    for (int i = 0; i < (int)(n); i++) p[i] = 0;
    for (int i = 1; i < n - 1; i++) {
      if (a[i - 1] < a[i] && a[i] > a[i + 1]) p[i] = 1;
    }
    int ans = 0;
    int id = 1;
    for (int i = 0; i < (int)(k); i++) {
      if (i == 0 || i == k - 1)
        continue;
      else
        ans += p[i];
    }
    int tmp = ans;
    for (int i = 0; i < (int)(n - k + 1); i++) {
      if (i == 0) continue;
      tmp -= p[i];
      tmp += p[k + i - 2];
      if (tmp > ans) {
        ans = tmp;
        id = i + 1;
      }
    }
    cout << ans + 1 << ' ' << id << endl;
  }
}
