#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n, k;
    cin >> n >> k;
    vector<long long> mem(n);
    for (int index = 0; index < n; ++index) {
      cin >> mem[index];
    }
    int retSlice = 1;
    int retStIndex = 0;
    for (int index = 0 + 1; index <= 0 + k - 2; ++index) {
      if ((mem[index] > mem[index - 1]) && (mem[index] > mem[index + 1])) {
        retSlice++;
      }
    }
    int preSlice = retSlice;
    for (int rightIndex = k - 1; rightIndex <= (n - 2); ++rightIndex) {
      if ((mem[rightIndex] > mem[rightIndex - 1]) &&
          (mem[rightIndex] > mem[rightIndex + 1])) {
        preSlice++;
      }
      if ((mem[rightIndex - k + 2] > mem[rightIndex - k + 1]) &&
          (mem[rightIndex - k + 2] > mem[rightIndex - k + 3])) {
        preSlice--;
      }
      if (preSlice > retSlice) {
        retSlice = preSlice;
        retStIndex = rightIndex - k + 2;
      }
    }
    cout << retSlice << " " << retStIndex + 1 << endl;
  }
  return 0;
}
