#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t) {
    long long n, k;
    cin >> n >> k;
    vector<long long> v;
    for (long long i = 0; i < n; i++) {
      long long e;
      cin >> e;
      v.push_back(e);
    }
    long long l = 0, r = k - 1, peaks = 0, start = 0;
    vector<long long> a;
    for (long long i = 0; i < n; i++) a.push_back(0);
    for (long long i = 1; i < n - 1; i++) {
      if (v[i] > v[i - 1] && v[i] > v[i + 1]) {
        a[i] = 1;
      }
    }
    long long c = 0;
    for (long long i = 1; i < r; i++) {
      if (a[i] == 1) c++;
    }
    peaks = c;
    l++;
    r++;
    while (r < n) {
      if (a[l] == 1) c--;
      if (a[r - 1] == 1) c++;
      if (c > peaks) {
        peaks = c;
        start = l;
      }
      l++;
      r++;
    }
    cout << peaks + 1 << " " << start + 1 << endl;
    t--;
  }
}
