#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int MOD = 1e9 + 7;
const ll INF = 2e18;
const int inf = 2e9;
namespace amit {
template <class T>
void re(complex<T>& x);
template <class T1, class T2>
void re(pair<T1, T2>& p);
inline bool blank(char c) {
  return (c == ' ' || c == '\t' || c == '\r' || c == '\n');
};
template <class T>
void re(vector<T>& a);
template <class T, size_t SZ>
void re(array<T, SZ>& a);
void re(int& x) { scanf("%d", &x); }
void re(long& x) { scanf("%ld", &x); }
void re(ll& x) { scanf("%lld", &x); }
void re(unsigned& x) { scanf("%u", &x); }
void re(unsigned long& x) { scanf("%lu", &x); }
void re(unsigned long long& x) { scanf("%llu", &x); }
void re(float& x) { scanf("%f", &x); }
void re(double& x) { scanf("%lf", &x); }
void re(ld& x) { scanf("%Lf", &x); }
bool re(char& x) {
  if (scanf("%c", &x) == EOF) return false;
  if (blank(x)) re(x);
  return true;
}
bool red(char& x) {
  if (scanf("%c", &x) == EOF) return false;
  return true;
}
void re(string& x) {
  char c;
  x = "";
  if (!re(c)) return;
  while (!blank(c)) {
    x += c;
    if (!red(c)) break;
  }
}
template <class T, class... Ts>
void re(T& t, Ts&... ts) {
  re(t);
  re(ts...);
}
template <class T>
void re(complex<T>& x) {
  T a, b;
  re(a, b);
  x = {a, b};
}
template <class T1, class T2>
void re(pair<T1, T2>& p) {
  re(p.first, p.second);
}
template <class T>
void re(vector<T>& a) {
  for (int i = (0) - (1 - 2 * (0 > ((int)a.size())) < 0);
       (1 - 2 * (0 > ((int)a.size()))) > 0 ? i < (((int)a.size()))
                                           : i >= (((int)a.size()));
       i += (1 - 2 * (0 > ((int)a.size()))))
    re(a[i]);
}
template <class T, size_t SZ>
void re(array<T, SZ>& a) {
  for (int i = (0) - (1 - 2 * (0 > SZ) < 0);
       (1 - 2 * (0 > SZ)) > 0 ? i < (SZ) : i >= (SZ); i += (1 - 2 * (0 > SZ)))
    re(a[i]);
}
void pr(int x) { printf("%d", x); }
void pr(long x) { printf("%ld", x); }
void pr(ll x) { printf("%lld", x); }
void pr(unsigned x) { printf("%u", x); }
void pr(unsigned long x) { printf("%lu", x); }
void pr(unsigned long long x) { printf("%llu", x); }
void pr(float x) { printf("%.3f", x); }
void pr(double x) { printf("%.5lf", x); }
void pr(ld x) { printf("%.10Lf", x); }
void pr(char x) { printf("%c", x); }
void pr(const char* x) { printf("%s", x); }
void pr(const string& x) { printf("%s", x.c_str()); }
void pr(bool x) { pr(x ? "true" : "false"); }
template <class T>
void pr(const complex<T>& x) {
  cout << x;
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x);
template <class T>
void pr(const T& x);
template <class T, class... Ts>
void pr(const T& t, const Ts&... ts) {
  pr(t);
  pr(ts...);
}
template <class T1, class T2>
void pr(const pair<T1, T2>& x) {
  pr("(", x.first, ", ", x.second, ")");
}
template <class T>
void pr(const T& x) {
  pr("{");
  bool fst = 1;
  for (const auto& a : x) pr(!fst ? ", " : "", a), fst = 0;
  pr("}");
}
void ps() { pr("\n"); }
template <class T, class... Ts>
void ps(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(" ");
  ps(ts...);
}
void pc() { pr("]\n"); }
template <class T, class... Ts>
void pc(const T& t, const Ts&... ts) {
  pr(t);
  if (sizeof...(ts)) pr(", ");
  pc(ts...);
}
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
vector<ll> fact;
vector<ll> invf;
ll mod = MOD;
ll power(ll x, ll n) {
  ll res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % mod;
    x = x * x % mod;
    n >>= 1;
  }
  return res;
}
ll mod_inv(ll x) { return power(x, mod - 2); }
ll nCr(ll n, ll r) { return ((fact[n] * invf[r] % mod) * invf[n - r]) % mod; }
ll nPr(ll n, ll r) { return (fact[n] * invf[n - r]) % mod; }
ll nHr(ll n, ll r) { return nCr(r + n - 1, r); }
void comb_init(ll n, ll _mod = MOD) {
  mod = _mod;
  fact.resize(n + 1);
  fact[0] = 1;
  for (int i = (0) - (1 - 2 * (0 > n) < 0);
       (1 - 2 * (0 > n)) > 0 ? i < (n) : i >= (n); i += (1 - 2 * (0 > n))) {
    fact[i + 1] = (fact[i] * (i + 1LL)) % mod;
  }
  invf.resize(n + 1);
  invf[n] = mod_inv(fact[n]);
  for (int i = n; i > 0; i--) {
    invf[i - 1] = invf[i] * i % mod;
  }
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll rnd(ll x = 0, ll y = INF) { return (rng() % (y - x + 1)) + x; };
};  // namespace amit
using namespace amit;
struct mi {
  using T = decay<decltype(MOD)>::type;
  T v;
  explicit operator T() const { return v; }
  mi() { v = 0; }
  mi(ll _v) {
    v = (-MOD < _v && _v < MOD) ? _v : _v % MOD;
    if (v < 0) v += MOD;
  }
  friend bool operator==(const mi& a, const mi& b) { return a.v == b.v; }
  friend bool operator!=(const mi& a, const mi& b) { return !(a == b); }
  friend bool operator<(const mi& a, const mi& b) { return a.v < b.v; }
  friend ostream& operator<<(ostream& os, const mi& a) { return os << a.v; }
  friend void pr(const mi& m) { pr(m.v); }
  mi& operator+=(const mi& m) {
    if ((v += m.v) >= MOD) v -= MOD;
    return *this;
  }
  mi& operator-=(const mi& m) {
    if ((v -= m.v) < 0) v += MOD;
    return *this;
  }
  mi& operator*=(const mi& m) {
    v = (ll)v * m.v % MOD;
    return *this;
  }
  mi& operator/=(const mi& m) { return (*this) *= inv(m); }
  friend mi pow(mi a, ll p) {
    mi ans = 1;
    assert(p >= 0);
    for (; p; p /= 2, a *= a)
      if (p & 1) ans *= a;
    return ans;
  }
  friend mi inv(const mi& a) {
    assert(a.v != 0);
    return pow(a, MOD - 2);
  }
  mi operator-() const { return mi(-v); }
  mi& operator++() { return *this += 1; }
  mi& operator--() { return *this -= 1; }
  friend mi operator+(mi a, const mi& b) { return a += b; }
  friend mi operator-(mi a, const mi& b) { return a -= b; }
  friend mi operator*(mi a, const mi& b) { return a *= b; }
  friend mi operator/(mi a, const mi& b) { return a /= b; }
};
const int MX = 2e5 + 10;
int n, m;
vector<int> a;
void solve() {
  int n, k;
  re(n, k);
  a.resize(n);
  re(a);
  vector<int> c(n + 1, 0);
  for (int i = (1) - (1 - 2 * (1 > n - 1) < 0);
       (1 - 2 * (1 > n - 1)) > 0 ? i < (n - 1) : i >= (n - 1);
       i += (1 - 2 * (1 > n - 1))) {
    if (a[i] > a[i - 1] and a[i] > a[i + 1]) {
      c[i + 1] = 1;
    }
  };
  for (int i = (1) - (1 - 2 * (1 > n + 1) < 0);
       (1 - 2 * (1 > n + 1)) > 0 ? i < (n + 1) : i >= (n + 1);
       i += (1 - 2 * (1 > n + 1)))
    c[i] += c[i - 1];
  int id = -1, ans = 0;
  for (int i = (1) - (1 - 2 * (1 > n - k + 2) < 0);
       (1 - 2 * (1 > n - k + 2)) > 0 ? i < (n - k + 2) : i >= (n - k + 2);
       i += (1 - 2 * (1 > n - k + 2))) {
    int l = i, r = min(n, i + k - 1);
    ;
    if (ckmax(ans, c[r - 1] - c[l])) id = i;
  }
  if (id == -1)
    ps(1, 1);
  else
    ps(ans + 1, id);
}
int main() {
  int t;
  re(t);
  while (t--) solve();
  return 0;
}
