import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.util.*;
import java.io.*;
import java.lang.*;
public class Main{
    public static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static long gcd(long a, long b){
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
    static long lcm(long a, long b)  {
        return (a*b)/gcd(a, b);
    }
    public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override

          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }
    static long func(long a[],long size,int s){
        long max1=a[s];
        long maxc=a[s];
        for(int i=s+1;i<size;i++){
            maxc=Math.max(a[i],maxc+a[i]);
            max1=Math.max(maxc,max1);
        }
        return max1;
    }
    public static class Pair<U extends Comparable<U>, V extends Comparable<V>> implements Comparable<Pair<U, V>> {
        public U x;
        public V y;

        public Pair(U x, V y) {
            this.x = x;
            this.y = y;
        }

        public int hashCode() {
            return (x == null ? 0 : x.hashCode() * 31) + (y == null ? 0 : y.hashCode());
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Pair<U, V> p = (Pair<U, V>) o;
            return (x == null ? p.x == null : x.equals(p.x)) && (y == null ? p.y == null : y.equals(p.y));
        }

        public int compareTo(Pair<U, V> b) {
            int cmpU = x.compareTo(b.x);
            return cmpU != 0 ? cmpU : y.compareTo(b.y);
        }

        public String toString() {
            return String.format("(%s, %s)", x.toString(), y.toString());
        }

    }
    static LinkedList<Integer> li[]=new LinkedList[100001];
    static int ans1=0,ans2=0,max1=-1;
    static int dist[]=new int[100001];
    static int visited[][];
    //static int arr[];
    static ArrayList<Integer> adj[];
    // static void bfs(int n,int m){
    //     //visited[x]=1;
    //     //visit[j]++;
    //     dist[n]=0;
    //     visited[n]=1;
    //     Queue<Integer> q=new LinkedList<>();
    //     q.add(n);
    //     while(!q.isEmpty()){
    //         int x=q.poll();
    //         for(int i=0;i<adj[x].size();i++){
    //             if(visited[adj[x].get(i)]==0){
    //                 q.add(adj[x].get(i));
    //                 visited[adj[x].get(i)]=1;
    //                 dist[adj[x].get(i)]=dist[x]+1;
    //             }
    //             if(adj[x].get(i)==m)
    //             {
    //                 return;
    //             }
    //         }
    //     }
    //     // for(int i=0;i<adj[x].size();i++){
    //     //     if(visited[adj[x].get(i)]==0){
    //     //         //check[j]++;
    //     //         ans1++;
    //     //         dfs(adj[x].get(i));
    //     //     }
    //     // }
    // }
    public static void main(String args[]){
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter w = new PrintWriter(outputStream);
        int t,i,j;
        t=in.nextInt();
        while(t-->0){
            int n,k,b,c,d;
            n=in.nextInt();
            k=in.nextInt();
            int arr[]=new int[n];
            int pre[]=new int[n];
            for(i=0;i<n;i++){
                arr[i]=in.nextInt();
            }
            for(i=1;i<n-1;i++){
                if(arr[i]>arr[i-1]&&arr[i]>arr[i+1]){
                    pre[i]++;
                }
            }
            for(i=1;i<n;i++){
                pre[i]+=pre[i-1];
                //w.print(pre[i]+" ");
            }
            // for(i=n-1;i>=1;i--){
            //     if(pre[i]!=pre[i-1]){
            //         pre[i]=pre[i-1];
            //     }
            // }
            // for(i=0;i<n;i++){
            //     //pre[i+1]+=pre[i];
            //     w.print(pre[i]+" ");
            // }
            // w.println();
            int max=0,ind=0,diff=0;

            for(i=0;i<n-k+1;i++){
                diff=pre[i+k-1]-pre[i];
                if(pre[i+k-2]!=pre[i+k-1]){
                    diff--;
                }
                if(max<diff){
                    max=diff;
                    ind=i+1;
                }

            }
            if(max==0){
                ind=1;
            }
            w.println((max+1)+" "+ind);
        }
        w.close();
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.InputMismatchException;
import java.util.*;
import java.io.*;
import java.lang.*;
public class Main{
    public static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static long gcd(long a, long b){
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
    static long lcm(long a, long b)  {
        return (a*b)/gcd(a, b);
    }
    public static void sortbyColumn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override

          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }
    static long func(long a[],long size,int s){
        long max1=a[s];
        long maxc=a[s];
        for(int i=s+1;i<size;i++){
            maxc=Math.max(a[i],maxc+a[i]);
            max1=Math.max(maxc,max1);
        }
        return max1;
    }
    public static class Pair<U extends Comparable<U>, V extends Comparable<V>> implements Comparable<Pair<U, V>> {
        public U x;
        public V y;

        public Pair(U x, V y) {
            this.x = x;
            this.y = y;
        }

        public int hashCode() {
            return (x == null ? 0 : x.hashCode() * 31) + (y == null ? 0 : y.hashCode());
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Pair<U, V> p = (Pair<U, V>) o;
            return (x == null ? p.x == null : x.equals(p.x)) && (y == null ? p.y == null : y.equals(p.y));
        }

        public int compareTo(Pair<U, V> b) {
            int cmpU = x.compareTo(b.x);
            return cmpU != 0 ? cmpU : y.compareTo(b.y);
        }

        public String toString() {
            return String.format("(%s, %s)", x.toString(), y.toString());
        }

    }
    static LinkedList<Integer> li[]=new LinkedList[100001];
    static int ans1=0,ans2=0,max1=-1;
    static int dist[]=new int[100001];
    static int visited[][];
    //static int arr[];
    static ArrayList<Integer> adj[];
    // static void bfs(int n,int m){
    //     //visited[x]=1;
    //     //visit[j]++;
    //     dist[n]=0;
    //     visited[n]=1;
    //     Queue<Integer> q=new LinkedList<>();
    //     q.add(n);
    //     while(!q.isEmpty()){
    //         int x=q.poll();
    //         for(int i=0;i<adj[x].size();i++){
    //             if(visited[adj[x].get(i)]==0){
    //                 q.add(adj[x].get(i));
    //                 visited[adj[x].get(i)]=1;
    //                 dist[adj[x].get(i)]=dist[x]+1;
    //             }
    //             if(adj[x].get(i)==m)
    //             {
    //                 return;
    //             }
    //         }
    //     }
    //     // for(int i=0;i<adj[x].size();i++){
    //     //     if(visited[adj[x].get(i)]==0){
    //     //         //check[j]++;
    //     //         ans1++;
    //     //         dfs(adj[x].get(i));
    //     //     }
    //     // }
    // }
    public static void main(String args[]){
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter w = new PrintWriter(outputStream);
        int t,i,j;
        t=in.nextInt();
        while(t-->0){
            int n,k,b,c,d;
            n=in.nextInt();
            k=in.nextInt();
            int arr[]=new int[n];
            int pre[]=new int[n];
            for(i=0;i<n;i++){
                arr[i]=in.nextInt();
            }
            for(i=1;i<n-1;i++){
                if(arr[i]>arr[i-1]&&arr[i]>arr[i+1]){
                    pre[i]++;
                }
            }
            for(i=1;i<n;i++){
                pre[i]+=pre[i-1];
                //w.print(pre[i]+" ");
            }
            for(i=n-1;i>=1;i--){
                if(pre[i]!=pre[i-1]){
                    pre[i]=pre[i-1];
                }
            }
            // for(i=0;i<n;i++){
            //     //pre[i+1]+=pre[i];
            //     w.print(pre[i]+" ");
            // }
            //w.println();
            int max=0,ind=0,diff=0;
            for(i=n-1;i>=2;i--){
                //if(pre[i]==pre[i-1]&&pre[i-1]!=pre[i-2]){
                    if(i-k+1>0){

                        diff=pre[i]-pre[i-k+1];
                        //w.println(i+" "+diff);
                        if(max<=diff){
                            max=diff;
                            ind=i-k+2;
                        }
                    }else{
                        diff=pre[i]-pre[0];
                        if(max<=diff){
                            max=diff;
                            ind=1;
                        }
                        break;
                    }

                // }else if(i-k+1<0){
                //     diff=pre[i]-pre[0];
                //     if(max<=diff){
                //         max=diff;
                //         ind=1;
                //     }
                // }
            }
            w.println((max+1)+" "+ind);
        }
        w.close();
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class E {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	      int t = Integer.parseInt(br.readLine());
	      while(t--!=0)
	      {
	    	  String[] str = br.readLine().split(" ");

	    	  int n = Integer.parseInt(str[0]);

	    	  int k = Integer.parseInt(str[1]);

	    	  Integer[] arr = new Integer[n];

	    	  String[] sarr = br.readLine().split(" ");

	    	  for(int i=0;i<n;i++)
	    	  {
	    		  arr[i]=Integer.parseInt(sarr[i]);
	    	  }

	    	  int[] peaks = new int[n];
	    	  Arrays.fill(peaks,0);
	    	  for(int i=1;i<n-1;i++)
	    	  {
	    		  if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
	    			  peaks[i]=1;
	    	  }

	    	  int max = Integer.MIN_VALUE;
	    	  int ans = -1;

	    	  for(int i=0;i+k-1<=n-1;i++)
	    	  {
	    		  int count=0;
	    		  for(int j=1 ;j<=k-2;j++)
	    		  {
	    			  if(peaks[i+j]==1)
	    				  count++;
	    		  }
	    		  if(count>max) {
	    			max=count;
	    			ans=i;
	    		  }

	    	  }

	    	  System.out.println((max+1)+" "+(ans+1));

	    	  }

  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class E {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	      int t = Integer.parseInt(br.readLine());
	      while(t--!=0)
	      {
	    	  String[] str = br.readLine().split(" ");

	    	  int n = Integer.parseInt(str[0]);

	    	  int k = Integer.parseInt(str[1]);

	    	  Integer[] arr = new Integer[n];

	    	  String[] sarr = br.readLine().split(" ");

	    	  for(int i=0;i<n;i++)
	    	  {
	    		  arr[i]=Integer.parseInt(sarr[i]);
	    	  }

	    	  ArrayList<Integer> peaks = new ArrayList<>();

	    	  for(int i=1;i<n-1;i++)
	    	  {
	    		  if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
	    			  peaks.add(i);
	    	  }

	    	  if(peaks.size()==1)
	    	  {
	    		  int ei = peaks.get(0);
	    		  int minl = Math.max(0,ei+1-k);
	    		  System.out.println(2+" "+(minl+1+1));
	    		  continue;
	    	  }

	    	  int max = -1;
	    	  int bl = -1;
	    	  int ei= -1;

	    	  for(int i=0;i<peaks.size();i++)
	    	  {
	    		  int p = peaks.get(i)-1;
	    		  int count=0;
	    		  while(i<peaks.size() && peaks.get(i)<p+k-1)
	    		  {
	    			  i++;
	    			  count++;
	    		  }

	    		  if(count>max)
	    		  {
	    			  max=count;
	    			  bl = p;
	    			  ei = peaks.get(i-1);
	    		  }

	    	  }

	    	//  System.out.println(bl+" "+ei);
	    	  ei=ei+1;
	    	  int minl=0;
	    	  if(ei-bl+1<k)
	    	  {
	    		  int df = k-(ei-bl+1);
	    		  minl = Math.max(0,bl-df);
	    	  }

	    	  else
	    		  minl=bl;

	    	  max=Math.max(max,0);
	    	  System.out.println(max+1+" "+(minl+1));

	  	  }

  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class E {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	      int t = Integer.parseInt(br.readLine());
	      while(t--!=0)
	      {
	    	  String[] str = br.readLine().split(" ");

	    	  int n = Integer.parseInt(str[0]);

	    	  int k = Integer.parseInt(str[1]);

	    	  Integer[] arr = new Integer[n];

	    	  String[] sarr = br.readLine().split(" ");

	    	  for(int i=0;i<n;i++)
	    	  {
	    		  arr[i]=Integer.parseInt(sarr[i]);
	    	  }

	    	  ArrayList<Integer> peaks = new ArrayList<>();
	    	  for(int i=1;i<n-1;i++)
	    	  {
	    		  if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
	    			  peaks.add(i);
	    	  }

	    	  int max = Integer.MIN_VALUE;
	    	  int s_peak =-1;
	    	  int e_peak = -1;

	    	  if(peaks.size()==0)
	    	  {
	    		  System.out.println(1+" "+1);
	    		  continue;
	    	  }

	    	  for(int i=0;i<peaks.size();i++)
	    	  {
	    		  int count=0;
	    		  int j=0;
	    		  while(i+j<peaks.size() && peaks.get(i+j)<=peaks.get(i)+k-3)
	    		  {
	    			  j++;
	    			  count++;
	    		  }

	    		  if(count>max)
	    		  {
	    			  max=count;
	    			  s_peak=peaks.get(i);
	    			  e_peak=peaks.get(j-1);
	    		  }
	    	  }

	    	  int ans = k-((e_peak-s_peak)+1)-1;
	    	  ans = Math.max(0,s_peak-ans);
	    	  System.out.println(max+1+" "+(ans+1));

  	  }

  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class E {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	      int t = Integer.parseInt(br.readLine());
	      while(t--!=0)
	      {
	    	  String[] str = br.readLine().split(" ");

	    	  int n = Integer.parseInt(str[0]);

	    	  int k = Integer.parseInt(str[1]);

	    	  Integer[] arr = new Integer[n];

	    	  String[] sarr = br.readLine().split(" ");

	    	  for(int i=0;i<n;i++)
	    	  {
	    		  arr[i]=Integer.parseInt(sarr[i]);
	    	  }

	    	  ArrayList<Integer> peaks = new ArrayList<>();

	    	  for(int i=1;i<n-1;i++)
	    	  {
	    		  if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
	    			  peaks.add(i);
	    	  }

	    	  if(peaks.size()==1)
	    	  {
	    		  int ei = peaks.get(0);
	    		  int minl = Math.max(0,ei+1-k);
	    		  System.out.println(2+" "+(minl+1+1));
	    		  continue;
	    	  }

	    	  int max = -1;
	    	  int bl = -1;
	    	  int ei= -1;

	    	  for(int i=0;i<peaks.size();i++)
	    	  {
	    		  int p = peaks.get(i)-1;
	    		  int count=0;
	    		  while(i<peaks.size() && peaks.get(i)<p+k-1)
	    		  {
	    			  i++;
	    			  count++;
	    		  }

	    		  if(count>max)
	    		  {
	    			  max=count;
	    			  bl = p;
	    			  ei = peaks.get(i-1);
	    		  }

	    	  }

	    	//  System.out.println(bl+" "+ei);
	    	  ei=ei+1;
	    	  int minl=0;
	    	  if(ei-bl+1<k)
	    	  {
	    		  int df = k-(ei-bl+1);
	    		  minl = Math.max(0,bl-df);
	    	  }

	    	  else
	    		  minl=bl;

	    	  System.out.println(max+1+" "+(minl+1));

	  	  }

  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class E {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	      int t = Integer.parseInt(br.readLine());
	      while(t--!=0)
	      {
	    	  String[] str = br.readLine().split(" ");

	    	  int n = Integer.parseInt(str[0]);

	    	  int k = Integer.parseInt(str[1]);

	    	  Integer[] arr = new Integer[n];

	    	  String[] sarr = br.readLine().split(" ");

	    	  for(int i=0;i<n;i++)
	    	  {
	    		  arr[i]=Integer.parseInt(sarr[i]);
	    	  }

	    	  ArrayList<Integer> peaks = new ArrayList<>();
	    	  for(int i=1;i<n-1;i++)
	    	  {
	    		  if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
	    			  peaks.add(i);
	    	  }

	    	  int max = Integer.MIN_VALUE;
	    	  int s_peak =-1;
	    	  int e_peak = -1;

	    	  for(int i=0;i<peaks.size();i++)
	    	  {
	    		  int count=0;
	    		  int j=0;
	    		  while(i+j<peaks.size() && peaks.get(i+j)<=peaks.get(i)+k-3)
	    		  {
	    			  j++;
	    			  count++;
	    		  }

	    		  if(count>max)
	    		  {
	    			  max=count;
	    			  s_peak=peaks.get(i);
	    			  e_peak=peaks.get(j-1);
	    		  }
	    	  }

	    	  int ans = k-((e_peak-s_peak)+1)-1;
	    	  ans = Math.max(0,s_peak-ans);
	    	  System.out.println(max+1+" "+(ans+1));

  	  }

  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

public class E {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	      int t = Integer.parseInt(br.readLine());
	      while(t--!=0)
	      {
	    	  String[] str = br.readLine().split(" ");

	    	  int n = Integer.parseInt(str[0]);

	    	  int k = Integer.parseInt(str[1]);

	    	  Integer[] arr = new Integer[n];

	    	  String[] sarr = br.readLine().split(" ");

	    	  for(int i=0;i<n;i++)
	    	  {
	    		  arr[i]=Integer.parseInt(sarr[i]);
	    	  }

	    	  int[] pref = new int[n];

	    	  pref[0]=0;
	    	  for(int i=1;i<n-1;i++)
	    	  {
	    		  if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
	    		  {
	    		     pref[i]=pref[i-1]+1;
	    		  }
	    		  else
	    			  pref[i]=pref[i-1];
	    	  }

	    	  pref[n-1]=pref[n-2];
	    	  int max = Integer.MIN_VALUE;
	    	  int minl =0;

	    	  for(int i=0;i<n;i++)
	    	  {
	    		  if(i+k-1<n)
	    		  {
		    		  int curr=pref[i+k-2]-pref[i];

		    		  if(curr>max)
		    		  {
		    			  max=curr;
		    			  minl = i;
		    		  }

	    		  }

	    		  else
	    			  break;
	    	  }

	    	  System.out.println(max+1+" "+(minl+1));

  	  }

  }
}


import java.util.Scanner;
public class Solution {
	public static void main(String[] args) {

		 Scanner sc = new Scanner(System.in);
			int t=sc.nextInt();
      for(int j =0;j<t;j++)
      {
    	  int n  =sc.nextInt();
    	  int k =sc.nextInt();
    	  int [] ar = new int[n];
     	for(int i =0;i<n;i++)
     		ar[i] =sc.nextInt();

     	int i =0;
     	int max =0;
         int left=0;
     	while(i<n-k+1)
     	{

     		int x =i+1;
     		int peak =0;
     		 while(x<k+i-1)
     		 {
     			if(ar[x-1]<ar[x] && ar[x+1] <ar[x] )
                    peak++;
     			x++;
     		 }
     		i++;
     		if(max<peak){
     			max=peak;
     			left =i;
     		}
     	}
     	System.out.println(max+1 +" " + left);

      }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Solution {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int t=Integer.parseInt(br.readLine());;
      for(int j =0;j<t;j++)
      {
    	  String s= br.readLine();
    	  String[] s1 = s.split(" ");
    	  int n =Integer.parseInt(s1[0]);
    	  int k = Integer.parseInt(s1[1]);
    	  String s2= br.readLine();
    	  String[] s3 = s2.split(" ");
    	  int [] ar = new int[n];
     	for(int i =0;i<n;i++)
     		ar[i] =Integer.parseInt(s3[i]);

     	int i =1;
     	int max =0;

         int peak =0;
     	while(i<k-1)
     	{
     		     if(ar[i-1]<ar[i]&& ar[i+1]<ar[i])
     		    	 peak++;
     		     i++;
     		     max = peak;

     	}
     	 int x =k-1;
     	int left=1;
     	 i=1;
     	while(x<n-1)
     	{
     		if(ar[i]>ar[i-1] && ar[i]>ar[i+1])
     			peak =peak- 1;
     		if(ar[x]>ar[x+1]&& ar[x]>ar[x-1])
     			peak =peak+1;

     		i++;
     		if( peak>max){
     			max =peak;
     			left=i;
     		}
     		x++;

     	}

     	if(max==0)
     		left =+1;
     	System.out.println(max+1 +" " + left);

      }
    }

}


import java.util.Scanner;
public class Solution {
	public static void main(String[] args) {

		 Scanner sc = new Scanner(System.in);
			int t=sc.nextInt();
      for(int j =0;j<t;j++)
      {
    	  int n  =sc.nextInt();
    	  int k =sc.nextInt();
    	  int [] ar = new int[n];
     	for(int i =0;i<n;i++)
     		ar[i] =sc.nextInt();

     	int i =0;
     	int max =0;
         int left=0;
     	while(i<n-k+1)
     	{

     		int x =i+1;
     		int peak =0;
     		 while(x<k+i-1)
     		 {
     			if(ar[x-1]<ar[x] && ar[x+1] <ar[x] )
                    peak++;
     			x++;
     		 }
     		i++;
     		if(max<peak){
     			max=peak;
     			left =i;
     		}
     	}
     	if(max==0)
     		left =+1;
     	System.out.println(max+1 +" " + left);

      }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Solution {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int t=Integer.parseInt(br.readLine());;
      for(int j =0;j<t;j++)
      {
    	  String s= br.readLine();
    	  String[] s1 = s.split(" ");
    	  int n =Integer.parseInt(s1[0]);
    	  int k = Integer.parseInt(s1[1]);
    	  String s2= br.readLine();
    	  String[] s3 = s2.split(" ");
    	  int [] ar = new int[n];
     	for(int i =0;i<n;i++)
     		ar[i] =Integer.parseInt(s3[i]);

     	int i =0;
     	int max =0;
         int left=0;
     	while(i<n-k+1)
     	{

     		int x =i+1;
     		int peak =0;
     		 while(x<k+i-1)
     		 {
     			if(ar[x-1]<ar[x] && ar[x+1] <ar[x] )
                    peak++;
     			x++;
     		 }
     		i++;
     		if(max<peak){
     			max=peak;
     			left =i;
     		}
     	}
     	if(max==0)
     		left =+1;
     	System.out.println(max+1 +" " + left);

      }
    }

}


import java.util.Map;
import java.util.Scanner;

public class Codeforces {

	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		while (t-- > 0) {
			int n = in.nextInt();
			int k = in.nextInt();
			long a[] = new long[n];
			for (int i=0;i<n;i++) {
				a[i] = in.nextLong();
			}

			int p[] = new int[n];
			p[0] = p[n-1] = 0;
			for (int i=1;i<n-1;i++) {
				if (a[i]>a[i-1] && a[i]>a[i+1]) {
					p[i] = 1;
				}
			}

			for (int i=1;i<n;i++) {
				p[i] = p[i] + p[i-1];
			}
			int ind = 0, max = 0;
			k--;
			for (int i=0;i<n-k;i++) {
				int s = p[i], e = p[i+k-1];
				if (e-s>max) {
					max = e-s;
					ind = i;
				}
			}
			System.out.println(++max + " " + ++ind);
		}
		in.close();
	}

	static void maxSum(int arr[], int n, int k)
    {
        int max_sum = 0;
        k--;
        int ind = -1, val = Integer.MIN_VALUE;
        for (int i = 1; i<k; i++) {
        	max_sum += arr[i];
        	if (max_sum>val) {
        		val = max_sum;
        		ind = 0;
        	}
        }

        int window_sum = max_sum;
        for (int i = k+1; i < n; i++) {
            window_sum += arr[i-1] - arr[i - k-1];
            max_sum = Math.max(max_sum, window_sum);
            if (max_sum>val) {
        		val = max_sum;
        		ind = i-k;
        	}
        }

        System.out.println(++val + " " + ++ind);
    }

}


import java.util.Map;
import java.util.Scanner;

public class Codeforces {

	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		while (t-- > 0) {
			int n = in.nextInt();
			int k = in.nextInt();
			long a[] = new long[n];
			for (int i=0;i<n;i++) {
				a[i] = in.nextLong();
			}

			int p[] = new int[n];
			p[0] = p[n-1] = 0;
			for (int i=1;i<n-1;i++) {
				if (a[i]>a[i-1] && a[i]>a[i+1]) {
					p[i] = 1;
				}
			}

			maxSum(p, n, k);
		}
		in.close();
	}

	static void maxSum(int arr[], int n, int k)
    {
        int max_sum = 0;
        int ind = -1, val = Integer.MIN_VALUE;
        for (int i = 0; i < k; i++) {
        	max_sum += arr[i];
        	if (max_sum-arr[0]-arr[k-1]>val) {
        		val = max_sum-arr[0]-arr[k-1];
        		ind = 0;
        	}
        }

        int window_sum = max_sum;
        for (int i = k; i < n; i++) {
            window_sum += arr[i] - arr[i - k];
            max_sum = Math.max(max_sum, window_sum);
            if (max_sum-arr[i]-arr[i-k+1]>val) {
        		val = max_sum-arr[i]-arr[i-k+1];
        		ind = i-k+1;
        	}
        }

        System.out.println(++max_sum + " " + ++ind);
    }

}


import java.util.Map;
import java.util.Scanner;

public class Codeforces {

	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		while (t-- > 0) {
			int n = in.nextInt();
			int k = in.nextInt();
			long a[] = new long[n];
			for (int i=0;i<n;i++) {
				a[i] = in.nextLong();
			}

			int p[] = new int[n];
			p[0] = p[n-1] = 0;
			for (int i=1;i<n-1;i++) {
				if (a[i]>a[i-1] && a[i]>a[i+1]) {
					p[i] = 1;
				}
			}

			maxSum(p, n, k);
		}
		in.close();
	}

	static void maxSum(int arr[], int n, int k)
    {
        int max_sum = 0;
        int ind = -1, val = Integer.MIN_VALUE;
        for (int i = 0; i < k-1; i++) {
        	max_sum += arr[i];
        	if (max_sum>val) {
        		val = max_sum;
        		ind = 0;
        	}
        }

        int window_sum = max_sum;
        for (int i = k; i < n; i++) {
            window_sum += arr[i-1] - arr[i - k];
            max_sum = Math.max(max_sum, window_sum);
            if (max_sum>val) {
        		val = max_sum;
        		ind = i-k+1;
        	}
        }

        System.out.println(++max_sum + " " + ++ind);
    }

}


import java.util.Map;
import java.util.Scanner;

public class Codeforces {

	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		while (t-- > 0) {
			int n = in.nextInt();
			int k = in.nextInt();
			long a[] = new long[n];
			for (int i=0;i<n;i++) {
				a[i] = in.nextLong();
			}

			int p[] = new int[n];
			p[0] = p[n-1] = 0;
			for (int i=1;i<n-1;i++) {
				if (a[i]>a[i-1] && a[i]>a[i+1]) {
					p[i] = 1;
				}
			}

			maxSum(p, n, k);
		}
		in.close();
	}

	static void maxSum(int arr[], int n, int k)
    {
        int max_sum = 0;
        int ind = -1, val = Integer.MIN_VALUE;
        for (int i = 1; i < k-1; i++) {
        	max_sum += arr[i];
        	if (max_sum>val) {
        		val = max_sum;
        		ind = 0;
        	}
        }

        int window_sum = max_sum;
        for (int i = k; i < n; i++) {
            window_sum += arr[i-1] - arr[i - k];
            max_sum = Math.max(max_sum, window_sum);
            if (max_sum>val) {
        		val = max_sum;
        		ind = i-k+1;
        	}
        }

        System.out.println(++max_sum + " " + ++ind);
    }

}


import java.util.Map;
import java.util.Scanner;

public class Codeforces {

	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		int t = in.nextInt();
		while (t-- > 0) {
			int n = in.nextInt();
			int k = in.nextInt();
			long a[] = new long[n];
			for (int i=0;i<n;i++) {
				a[i] = in.nextLong();
			}

			int p[] = new int[n];
			p[0] = p[n-1] = 0;
			for (int i=1;i<n-1;i++) {
				if (a[i]>a[i-1] && a[i]>a[i+1]) {
					p[i] = 1;
				}
			}

			maxSum(p, n, k);
		}
		in.close();
	}

	static void maxSum(int arr[], int n, int k)
    {
        int max_sum = 0;
        k--;
        int ind = -1, val = Integer.MIN_VALUE;
        for (int i = 1; i<k; i++) {
        	max_sum += arr[i];
        	if (max_sum>val) {
        		val = max_sum;
        		ind = 0;
        	}
        }

        int window_sum = max_sum;
        for (int i = k+1; i < n; i++) {
            window_sum += arr[i-1] - arr[i - k-1];
            max_sum = Math.max(max_sum, window_sum);
            if (max_sum>val) {
        		val = max_sum;
        		ind = i-k;
        	}
        }

        System.out.println(++val + " " + ++ind);
    }

}


import java.math.*;
import java.io.*;
import java.util.*;

public class Solution {
    static long mod = (long)1e9+7;
	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);
		int t = sc.nextInt();
		while (t-->0) {
		    int n = sc.nextInt();
		    int k = sc.nextInt();
		    int[] a = new int[n];
		    int[] p = new int[n];
		    for (int i=0;i<n ;i++ ){
		        a[i] = sc.nextInt();
		    }
		    for(int i=1;i<n-1;i++){
		        if(a[i]>a[i-1] && a[i]>a[i+1]) p[i] = 1;
		    }
		    for(int i=1;i<n;i++) p[i]+=p[i-1];
		    int max = p[k-1], maxid = 0;
		    if(k>=2 && k<n && a[k-1]>a[k] && a[k-1]>a[k-2]) max--;
		    for (int i=1;i<=n-k ;i++ ){
		        int temp = p[i+k-1]-p[i-1];
		        if(i!=n-k && a[i+k-1]>a[i+k] && a[i+k-1]>a[i+k-2]) temp--;
		        if(a[i]>a[i-1] && a[i]>a[i+1]) temp--;
		        if(temp>max){
		            max = temp;
		            maxid = i;
		        }
		    }
		    max++;
		    maxid++;
		    System.out.println(max+" "+maxid);
		}
	}
	static long power(long a, long b, long c){
	    if(b==0) return 1L;
	    if(b==1) return a;
	    long temp = power(a, b/2, c);
	    if(b%2==0) return (temp*temp)%c;
	    else return (((temp*temp)%c)*a)%c;
	}
	static class Pair implements Comparable<Pair>{
		int a, b;
		public Pair(int c, int d){
			a = c;
			b = d;
		}
		public int compareTo(Pair p){
		    return a-p.a;
		}
	}
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}
		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}
		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}
		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


import java.math.*;
import java.io.*;
import java.util.*;

public class Solution {
    static long mod = (long)1e9+7;
	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);
		int t = sc.nextInt();
		while (t-->0) {
		    int n = sc.nextInt();
		    int k = sc.nextInt();
		    int[] a = new int[n];
		    int[] p = new int[n];
		    for (int i=0;i<n ;i++ ){
		        a[i] = sc.nextInt();
		    }
		    for(int i=1;i<n-1;i++){
		        if(a[i]>a[i-1] && a[i]>a[i+1]) p[i] = 1;
		    }
		    for(int i=1;i<n;i++) p[i]+=p[i-1];
		    int max = p[k-1], maxid = 0;
		    if(k>=2 && k!=n-1 && a[k-1]>a[k] && a[k-1]>a[k-2]) max--;
		    for (int i=1;i<=n-k ;i++ ){
		        int temp = p[i+k-1]-p[i-1];
		        if(i!=n-k && a[i+k-1]>a[i+k] && a[i+k-1]>a[i+k-2]) temp--;
		        if(a[i]>a[i-1] && a[i]>a[i+1]) temp--;
		        if(temp>max){
		            max = temp;
		            maxid = i;
		        }
		    }
		    max++;
		    maxid++;
		    System.out.println(max+" "+maxid);
		}
	}
	static long power(long a, long b, long c){
	    if(b==0) return 1L;
	    if(b==1) return a;
	    long temp = power(a, b/2, c);
	    if(b%2==0) return (temp*temp)%c;
	    else return (((temp*temp)%c)*a)%c;
	}
	static class Pair implements Comparable<Pair>{
		int a, b;
		public Pair(int c, int d){
			a = c;
			b = d;
		}
		public int compareTo(Pair p){
		    return a-p.a;
		}
	}
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}
		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}
		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}
		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


import java.math.*;
import java.io.*;
import java.util.*;

public class Solution {
    static long mod = (long)1e9+7;
	public static void main(String[] args) {
		FastScanner sc = new FastScanner(System.in);
		int t = sc.nextInt();
		while (t-->0) {
		    int n = sc.nextInt();
		    int k = sc.nextInt();
		    int[] a = new int[n];
		    int[] p = new int[n];
		    for (int i=0;i<n ;i++ ){
		        a[i] = sc.nextInt();
		    }
		    for(int i=1;i<n-1;i++){
		        if(a[i]>a[i-1] && a[i]>a[i+1]) p[i] = 1;
		    }
		    for(int i=1;i<n;i++) p[i]+=p[i-1];
		    int max = p[k-1], maxid = 0;
		    if(k!=n-1 && a[k-1]>a[k] && a[k-1]>a[k-2]) max--;
		    for (int i=1;i<=n-k ;i++ ){
		        int temp = p[i+k-1]-p[i-1];
		        if(i!=n-k && a[i+k-1]>a[i+k] && a[i+k-1]>a[i+k-2]) temp--;
		        if(a[i]>a[i-1] && a[i]>a[i+1]) temp--;
		        if(temp>max){
		            max = temp;
		            maxid = i;
		        }
		    }
		    max++;
		    maxid++;
		    System.out.println(max+" "+maxid);
		}
	}
	static long power(long a, long b, long c){
	    if(b==0) return 1L;
	    if(b==1) return a;
	    long temp = power(a, b/2, c);
	    if(b%2==0) return (temp*temp)%c;
	    else return (((temp*temp)%c)*a)%c;
	}
	static class Pair implements Comparable<Pair>{
		int a, b;
		public Pair(int c, int d){
			a = c;
			b = d;
		}
		public int compareTo(Pair p){
		    return a-p.a;
		}
	}
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}
		FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}
		String nextLine() {
			try {
				return br.readLine();
			} catch (IOException e) {
				return null;
			}
		}
		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


import java.util.*;
import java.io.*;
public class Main{
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }

    }
    static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object...objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object...objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

		}

    static class IOUtils {

		public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.nextInt();
            return array;
        }

    }
    static int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
    static int mod = (int)(1e9+7);
    public static long pow(long a,long b)
    {
        long ans = 1;
        while(b> 0)
        {
            if((b & 1)==1){
                ans = (ans*a) % mod;
            }
            a = (a*a) % mod;
            b = b>>1;
        }
        return ans;
    }

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        //IOUtils io = new IOUtils();
        int t = in.nextInt();
        while(t-- >0)
        {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] arr = in.nextIntArray(n);
            int[] peak = new int[n];
            for(int i=1;i<n-1;i++)
            {
                if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                {
                    peak[i] = 1;
                }
            }
           // out.printLine(Arrays.toString(peak));
            int count = 0;
            int i=0,j=k-1;
            for(int x=0;x<j;x++)
            {
                if(peak[x]==1)
                count++;
            }
           //out.printLine(count);
            int p=0,l=-1;
            while(j<n)
            {
                if(peak[i]==1)
                {
                    count--;
                }
                if(p<count)
                {
                    p = count;
                    l = i;
                }
                if(peak[j]==1)
                {
                    count++;
                }
                i++;
                j++;
            }
            out.printLine(p+1 + " " +(l+1));
        }
        out.flush();
        out.close();
    }
}


import java.util.*;
import java.io.*;
public class Main{
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }

    }
    static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object...objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object...objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

		}

    static class IOUtils {

		public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.nextInt();
            return array;
        }

    }
    static int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
    static int mod = (int)(1e9+7);
    public static long pow(long a,long b)
    {
        long ans = 1;
        while(b> 0)
        {
            if((b & 1)==1){
                ans = (ans*a) % mod;
            }
            a = (a*a) % mod;
            b = b>>1;
        }
        return ans;
    }

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        //IOUtils io = new IOUtils();
        int t = in.nextInt();
        while(t-- >0)
        {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] arr = in.nextIntArray(n);
            int[] peak = new int[n];
            for(int i=1;i<n-1;i++)
            {
                if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                {
                    peak[i] = 1;
                }
            }
           // out.printLine(Arrays.toString(peak));
            int count = 0;
            int i=0,j=k-1;
            for(int x=0;x<j;x++)
            {
                if(peak[x]==1)
                    count++;
            }
            int p=0,l=0;
            while(j<n)
            {
                if(peak[i]==1)
                {
                    count--;
                }
                //out.printLine(i + " " + j + " " + count);
                if(p<count)
                {
                    p = count;
                    l = i;
                }
                if(peak[j]==1)
                {
                    count++;
                }
                i++;
                j++;
            }
            if(p==0)
            {
                out.printLine("0 1");
            }
            else
                out.printLine((p+1) + " " +(l+1));
        }
        out.flush();
        out.close();
    }
}


import java.util.*;
import java.io.*;
public class Main{
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }

    }
    static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object...objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object...objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

		}

    static class IOUtils {

		public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.nextInt();
            return array;
        }

    }
    static int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
    static int mod = (int)(1e9+7);
    public static long pow(long a,long b)
    {
        long ans = 1;
        while(b> 0)
        {
            if((b & 1)==1){
                ans = (ans*a) % mod;
            }
            a = (a*a) % mod;
            b = b>>1;
        }
        return ans;
    }

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        //IOUtils io = new IOUtils();
        int t = in.nextInt();
        while(t-- >0)
        {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] arr = in.nextIntArray(n);
            int[] peak = new int[n];
            for(int i=1;i<n-1;i++)
            {
                if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                {
                    peak[i] = 1;
                }
            }
           // out.printLine(Arrays.toString(peak));
            int count = 0;
            int i=0,j=k-1;
            for(int x=0;x<j;x++)
            {
                if(peak[x]==1)
                    count++;
            }
            int p=0,l=0;
            while(j<n)
            {
                if(peak[i]==1)
                {
                    count--;
                }
                //out.printLine(i + " " + j + " " + count);
                if(p<count)
                {
                    p = count;
                    l = i;
                }
                if(peak[j]==1)
                {
                    count++;
                }
                i++;
                j++;
            }
            if(p==0)
            {
                out.printLine("0 0");
            }
            else
                out.printLine((p+1) + " " +(l+1));
        }
        out.flush();
        out.close();
    }
}


import java.util.*;
import java.io.*;
public class Main{
    static class InputReader {

        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = nextInt();
            }
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c)) {
                c = snext();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }

    }
    static class OutputWriter {
		private final PrintWriter writer;

		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
		}

		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}

		public void print(Object...objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}

		public void printLine(Object...objects) {
			print(objects);
			writer.println();
		}

		public void close() {
			writer.close();
		}

		public void flush() {
			writer.flush();
		}

		}

    static class IOUtils {

		public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++)
                array[i] = in.nextInt();
            return array;
        }

    }
    static int gcd(int a, int b)
    {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }
    static int mod = (int)(1e9+7);
    public static long pow(long a,long b)
    {
        long ans = 1;
        while(b> 0)
        {
            if((b & 1)==1){
                ans = (ans*a) % mod;
            }
            a = (a*a) % mod;
            b = b>>1;
        }
        return ans;
    }

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        OutputWriter out = new OutputWriter(System.out);
        //IOUtils io = new IOUtils();
        int t = in.nextInt();
        while(t-- >0)
        {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] arr = in.nextIntArray(n);
            int[] peak = new int[n];
            for(int i=1;i<n-1;i++)
            {
                if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                {
                    peak[i] = 1;
                }
            }
            //out.printLine(Arrays.toString(peak));
            long count = 0;
            int i=0,j=k-1;
            for(int x=0;x<j;x++)
            {
                if(peak[x]==1)
                    count++;
            }
            long p=0,l=0;
            while(j<n)
            {
                if(peak[i]==1)
                {
                    count--;
                }
                //out.printLine(i + " " + j + " " + count);
                if(p<count)
                {
                    p = count;
                    l = i;
                }
                if(peak[j]==1)
                {
                    count++;
                }
                i++;
                j++;
            }
            if(p==0)
            {
                out.printLine("1 1");
            }
            else
                out.printLine((p+1) + " " +(l+1));
        }
        out.flush();
        out.close();
    }
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class q2
{
	public static void main (String[] args) throws java.lang.Exception
	{
        // your code goes here
        Scanner sc = new Scanner(System.in);
        int t = Integer.parseInt(sc.next());
        while(t-->0)
        {
            int n = Integer.parseInt(sc.next());
            int k = Integer.parseInt(sc.next());
            int[] arr = new int[n];
            for(int i=0;i<n;i++)
            {
                arr[i]= Integer.parseInt(sc.next());
            }
            int[] a1 =new int[n];
            for(int i=1;i<n-1;i++)
            {
                if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
                {
                    a1[i]=1;
                }
            }
            int curr=0;
            int count=0;
            int ans=Integer.MIN_VALUE;
            int cans=0;
            for(int i=1;i<n;i++)
            {
                a1[i]=a1[i]+a1[i-1];
            }
            int[] pre= new int[n+1];
            pre[0]=0;
            for(int i=0;i<n;i++)
            {
                pre[i+1]=a1[i];
            }
            // for(int i=0;i<=n;i++)
            // {
            //     System.out.print(pre[i]+" ");
            // }
            //System.out.println("");
            for(int i=1;i<=n-k+1;i++)
            {
                if(pre[i+k-2]-pre[i-1]>ans)
                {
                    ans=pre[i+k-2]-pre[i-1];
                    cans= i;
                }
            }
            System.out.println((ans+1)+" "+cans);
        }
    }
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class q2
{
	public static void main (String[] args) throws java.lang.Exception
	{
        // your code goes here
        Scanner sc = new Scanner(System.in);
        int t = Integer.parseInt(sc.next());
        while(t-->0)
        {
            int n = Integer.parseInt(sc.next());
            int k = Integer.parseInt(sc.next());
            int[] arr = new int[n];
            for(int i=0;i<n;i++)
            {
                arr[i]= Integer.parseInt(sc.next());
            }
            int[] a1 =new int[n];
            for(int i=1;i<n-1;i++)
            {
                if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
                {
                    a1[i]=1;
                }
            }
            int curr=0;
            int count=0;
            int ans=Integer.MIN_VALUE;
            int cans=0;
            for(int i=1;i<n;i++)
            {
                a1[i]=a1[i]+a1[i-1];
            }
            int[] pre= new int[n+1];
            pre[0]=0;
            for(int i=0;i<n;i++)
            {
                pre[i+1]=a1[i];
            }
            // for(int i=0;i<=n;i++)
            // {
            //     System.out.print(pre[i]+" ");
            // }
            //System.out.println("");
            for(int i=0;i<=n-k;i++)
            {
                if(pre[i+k-1]-pre[i]>ans)
                {
                    ans=pre[i+k]-pre[i];
                    cans= i;
                }
            }
            System.out.println((ans+1)+" "+(cans));
        }
    }
}


/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class q2
{
	public static void main (String[] args) throws java.lang.Exception
	{
        // your code goes here
        Scanner sc = new Scanner(System.in);
        int t = Integer.parseInt(sc.next());
        while(t-->0)
        {
            int n = Integer.parseInt(sc.next());
            int k = Integer.parseInt(sc.next());
            int[] arr = new int[n];
            for(int i=0;i<n;i++)
            {
                arr[i]= Integer.parseInt(sc.next());
            }
            int[] a1 =new int[n];
            for(int i=1;i<n-1;i++)
            {
                if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
                {
                    a1[i]=1;
                }
            }
            int curr=0;
            int count=0;
            int ans=Integer.MIN_VALUE;
            int cans=0;
            for(int i=1;i<n;i++)
            {
                a1[i]=a1[i]+a1[i-1];
            }
            int[] pre= new int[n+1];
            pre[0]=0;
            for(int i=0;i<n;i++)
            {
                pre[i+1]=a1[i];
            }
            // for(int i=0;i<=n;i++)
            // {
            //     System.out.print(pre[i]+" ");
            // }
            //System.out.println("");
            for(int i=1;i<=n-k+1;i++)
            {
                if(pre[i+k-2]-pre[i]>ans)
                {
                    ans=pre[i+k-2]-pre[i];
                    cans= i;
                }
            }
            System.out.println((ans+1)+" "+cans);
        }
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int t = in.nextInt();
            while (t-- > 0) {
                int n = in.nextInt(), k = in.nextInt();
                int a[] = in.readIntArray(n);
                int f[] = new int[n];
                for (int i = 1; i < n - 1; ++i) {
                    if (a[i] > a[i - 1] && a[i] > a[i + 1]) f[i] = 1;
                }
                int cnt = 0, j = 0, max = 0, ind = 0, q = 0;
                for (int i = 0; i < n; ++i) {
                    if (j < k-1) {
                        if (j != 0 && j != k-1) if (f[i] == 1) cnt++;
                    }
                    if (j == k-1) {
                        if (max < cnt) {
                            max = cnt;
                            ind = q + 1;
                        }
                        cnt = 0;
                        j = 0;
                        q++;
                        i = q;
                    }
                    j++;
                }
                if(max==0) out.println(0+" "+0);
                else out.println((max + 1) + " " + ind);
            }
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int t = in.nextInt();
            while (t-- > 0) {
                int n = in.nextInt(), k = in.nextInt();
                int a[] = in.readIntArray(n);
                int f[] = new int[n];
                for (int i = 1; i < n - 1; ++i) {
                    if (a[i] > a[i - 1] && a[i] > a[i + 1]) f[i] = 1;
                }
                int cnt = 0, j = 0, max = 0, ind = 0, q = 0;
                for (int i = 0; i < n; ++i) {
                    if (j < k) {
                        if (j != 0 && j != k-1) if (f[i] == 1) cnt++;
                    }
                    if (j == k) {
                        if (max < cnt) {
                            max = cnt;
                            ind = q + 1;
                        }
                        cnt = 0;
                        j = 0;
                        q++;
                        i = q;
                    }
                    j++;
                }
                out.println((max + 1) + " " + ind);
            }
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int t = in.nextInt();
            while (t-- > 0) {
                int n = in.nextInt(), k = in.nextInt();
                int a[] = in.readIntArray(n);
                int f[] = new int[n];
                for (int i = 1; i < n - 1; ++i) {
                    if (a[i] > a[i - 1] && a[i] > a[i + 1]) f[i] = 1;
                }
                int cnt = 0, j = 0, max = 0, ind = 1, q = 0;
                for (int i = 0; i < n; ++i) {
                    if (j < k-1) {
                        if (j != 0 && j != k-1) if (f[i] == 1) cnt++;
                    }
                    if (j == k-1) {
                        if (max < cnt) {
                            max = cnt;
                            ind = q + 1;
                        }
                        cnt = 0;
                        j = 0;
                        q++;
                        i = q;
                    }
                    j++;
                }
                out.println((max + 1) + " " + ind);
            }
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int t = in.nextInt();
            while (t-- > 0) {
                int n = in.nextInt(), k = in.nextInt();
                int a[] = in.readIntArray(n);
                int f[] = new int[n];
                for (int i = 1; i < n - 1; ++i) {
                    if (a[i] > a[i - 1] && a[i] > a[i + 1]) f[i] = 1;
                }
                int cnt = 0, j = 0, max = 0, ind = 0, q = 0;
                for (int i = 0; i < n; ++i) {
                    if (j < k) {
                        if (j != 0 && j != k) if (f[i] == 1) cnt++;
                    }
                    if (j == k) {
                        if (max < cnt) {
                            max = cnt;
                            ind = q + 1;
                        }
                        cnt = 0;
                        j = 0;
                        q++;
                        i = q;
                    }
                    j++;
                }
                out.println((max + 1) + " " + ind);
            }
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int t = in.nextInt();
            while (t-- > 0) {
                int n = in.nextInt(), k = in.nextInt();
                int a[] = in.readIntArray(n);
                int f[] = new int[n];
                Arrays.fill(f,0);
                for (int i = 1; i < n - 1; ++i) {
                    if (a[i] > a[i - 1] && a[i] > a[i + 1]) f[i] = 1;
                }
                long cnt = 0, j = 0, max = -1, ind = 0, q = 0;
                for (int i = 0; i < n; ++i) {
                    if (j < k-1) {
                        if (j != 0 && j != k-1) if (f[i] == 1) cnt++;
                    }
                    if (j == k-1) {
                        if (max < cnt) {
                            max = cnt;
                            ind = q + 1;
                        }
                        cnt = 0;
                        j = 0;
                        q++;
                        i = (int)q;
                    }
                    j++;
                }
                if(max==0) out.println(0+" "+1);
                else out.println((max + 1) + " " + ind);
            }
        }
    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Pranay2516
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int t = in.nextInt();
            while (t-- > 0) {
                int n = in.nextInt(), k = in.nextInt();
                int a[] = in.readIntArray(n);
                int f[] = new int[n];
                Arrays.fill(f,0);
                for (int i = 1; i < n - 1; ++i) {
                    if (a[i] > a[i - 1] && a[i] > a[i + 1]) f[i] = 1;
                }
                long cnt = 0, j = 0, max = -1, ind = 0, q = 0;
                for (int i = 0; i < n; ++i) {
                    if (j < k-1) {
                        if (j != 0 && j != k-1) if (f[i] == 1) cnt++;
                    }
                    if (j == k-1) {
                        if (max < cnt) {
                            max = cnt;
                            ind = q + 1;
                        }
                        cnt = 0;
                        j = 0;
                        q++;
                        i = (int)q;
                    }
                    j++;
                }
                if(max==0) out.println(0+" "+ind);
                else out.println((max + 1) + " " + ind);
            }
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] readIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}