import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;

public final class B {

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        final int t = fs.nextInt();
        for (int test = 0; test < t; test++) {
            final int n = fs.nextInt();
            final int k = fs.nextInt();
            final int[] arr = fs.nextIntArray(n);
            int resStart = 1;
            int resPeaks = 0;
            int window = k - 2;
            int j = 1;
            int currPeaks = 0;
            for (int i = 1; i < n - 1; i++) {
                currPeaks += isPeak(i, arr) ? 1 : 0;
                window--;
                if (window < 0) {
                    currPeaks -= isPeak(j++, arr) ? 1 : 0;
                    window++;
                }
                if (window == 0) {
                    if (resPeaks < currPeaks) {
                        resPeaks = currPeaks;
                        resStart = j;
                    }
                }
            }

            System.out.println((resPeaks + 1) + " " + resStart);
        }
    }

    private static boolean isPeak(int i, int[] arr) {
        return arr[i - 1] < arr[i] && arr[i] > arr[i + 1];
    }

    static final class Utils {
        public static void shuffleSort(int[] x) {
            shuffle(x);
            Arrays.sort(x);
        }

        public static void shuffleSort(long[] x) {
            shuffle(x);
            Arrays.sort(x);
        }

        public static void shuffle(int[] x) {
            final Random r = new Random();

            for (int i = 0; i <= x.length - 2; i++) {
                final int j = i + r.nextInt(x.length - i);
                swap(x, i, j);
            }
        }

        public static void shuffle(long[] x) {
            final Random r = new Random();

            for (int i = 0; i <= x.length - 2; i++) {
                final int j = i + r.nextInt(x.length - i);
                swap(x, i, j);
            }
        }

        public static void swap(int[] x, int i, int j) {
            final int t = x[i];
            x[i] = x[j];
            x[j] = t;
        }

        public static void swap(long[] x, int i, int j) {
            final long t = x[i];
            x[i] = x[j];
            x[j] = t;
        }

        private Utils() {}
    }

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        private String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

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

        long[] nextLongArray(int n) {
            final long[] a = new long[n];
            for (int i = 0; i < n; i++) { a[i] = nextLong(); }
            return a;
        }
    }
}


// package endsem;
import java.util.*;
import java.lang.Math;
import java.io.*;
public class Cf_two {
	public static void main(String[] args) throws IOException{
		Reader.init(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int t=Reader.nextInt();
		for (int i = 0; i < t; i++) {
			int n=Reader.nextInt();
			int k=Reader.nextInt();
			int[] a=new int[n+1];
			for (int j = 1; j <= n; j++) {
				a[j]=Reader.nextInt();
			}
			Set<Integer> set=new HashSet<>();
			int cnt=0;
			int l=0;
			for (int j = 2; j < n; j++) {
				if(a[j]>a[j-1] && a[j]>a[j+1]) {
					l=1;
					set.add(j);
				}
			}
			//out.println(set+"index");
			for(int j=2;j<k;j++) {
				if(set.contains(j)) {
					cnt++;
				}
			}
			int x=k;
			int curr=cnt;
			//out.println(curr+"ini");
			for (int j = 2; j <=n-k+1; j++) {
				//if(a[x]>a[x-1] && a[x]>a[x+1])set.add(x);
				if(set.contains(j-1))curr--;
				if(set.contains(x))curr++;

				if(curr>cnt) {
					//out.println(curr+" curr and j "+j);
					l=j;
					cnt=curr;
				}
				//curr=cnt;
				x++;
			}
			out.println((cnt+1)+" "+l);
		}
		out.flush();
	}
}

class Reader {

    static BufferedReader reader;

    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */

    static void init(InputStream input) {

        reader = new BufferedReader(

                     new InputStreamReader(input) );

        tokenizer = new StringTokenizer("");

    }

    /** get next word */

    static String next() throws IOException {

        while ( ! tokenizer.hasMoreTokens() ) {

            //TODO add check for eof if necessary

            tokenizer = new StringTokenizer(

                   reader.readLine() );

        }

        return tokenizer.nextToken();

    }

    static int nextInt() throws IOException {

        return Integer.parseInt( next() );

    }

    static double nextDouble() throws IOException {

        return Double.parseDouble( next() );

    }
    static long nextLong() throws IOException{
		return Long.parseLong(next());
	}

	}


// package endsem;
import java.util.*;
import java.lang.Math;
import java.io.*;
public class Cf_two {
	public static void main(String[] args) throws IOException{
		Reader.init(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int t=Reader.nextInt();
		for (int i = 0; i < t; i++) {
			int n=Reader.nextInt();
			int k=Reader.nextInt();
			int[] a=new int[n+1];
			for (int j = 1; j <= n; j++) {
				a[j]=Reader.nextInt();
			}
			Set<Integer> set=new HashSet<>();
			int cnt=0;
			int l=1;
			for (int j = 2; j < n; j++) {
				if(a[j]>a[j-1] && a[j]>a[j+1])set.add(j);
			}
			//out.println(set+"index");
			for(int j=2;j<k;j++) {
				if(set.contains(j)) {
					cnt++;
				}
			}
			int x=k;
			int curr=cnt;
			//out.println(curr+"ini");
			for (int j = 2; j <=n-k+1; j++) {
				//if(a[x]>a[x-1] && a[x]>a[x+1])set.add(x);
				if(set.contains(j-1))curr--;
				if(set.contains(x))curr++;

				if(curr>cnt) {
					//out.println(curr+" curr and j "+j);
					l=j;
					cnt=curr;
				}
				//curr=cnt;
				x++;
			}
			out.println((cnt+1)+" "+l);
		}
		out.flush();
	}
}

class Reader {

    static BufferedReader reader;

    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */

    static void init(InputStream input) {

        reader = new BufferedReader(

                     new InputStreamReader(input) );

        tokenizer = new StringTokenizer("");

    }

    /** get next word */

    static String next() throws IOException {

        while ( ! tokenizer.hasMoreTokens() ) {

            //TODO add check for eof if necessary

            tokenizer = new StringTokenizer(

                   reader.readLine() );

        }

        return tokenizer.nextToken();

    }

    static int nextInt() throws IOException {

        return Integer.parseInt( next() );

    }

    static double nextDouble() throws IOException {

        return Double.parseDouble( next() );

    }
    static long nextLong() throws IOException{
		return Long.parseLong(next());
	}

	}


// package endsem;
import java.util.*;
import java.lang.Math;
import java.io.*;
public class Cf_two {
	public static void main(String[] args) throws IOException{
		Reader.init(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int t=Reader.nextInt();
		for (int i = 0; i < t; i++) {
			int n=Reader.nextInt();
			int k=Reader.nextInt();
			int[] a=new int[n+1];
			for (int j = 1; j <= n; j++) {
				a[j]=Reader.nextInt();
			}
			Set<Integer> set=new HashSet<>();
			int cnt=0;
			int l=1;
			for (int j = 2; j < n; j++) {
				if(a[j]>a[j-1] && a[j]>a[j+1]) {
					l=1;
					set.add(j);
				}
			}
			//out.println(set+"index");
			for(int j=2;j<k;j++) {
				if(set.contains(j)) {
					cnt++;
				}
			}
			int y=2;
			int x=k;
			int curr=cnt;
			//out.println(curr+"ini");
			for (int j = 2; j <=n-k+1; j++) {
				//if(a[x]>a[x-1] && a[x]>a[x+1])set.add(x);
				if(set.contains(y))curr--;
				if(set.contains(x))curr++;

				if(curr>cnt) {
					//out.println(curr+" curr and j "+j);
					l=j;
					cnt=curr;
				}
				//curr=cnt;
				y++;
				x++;
			}
			out.println((cnt+1)+" "+l);
		}
		out.flush();
	}
}

class Reader {

    static BufferedReader reader;

    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */

    static void init(InputStream input) {

        reader = new BufferedReader(

                     new InputStreamReader(input) );

        tokenizer = new StringTokenizer("");

    }

    /** get next word */

    static String next() throws IOException {

        while ( ! tokenizer.hasMoreTokens() ) {

            //TODO add check for eof if necessary

            tokenizer = new StringTokenizer(

                   reader.readLine() );

        }

        return tokenizer.nextToken();

    }

    static int nextInt() throws IOException {

        return Integer.parseInt( next() );

    }

    static double nextDouble() throws IOException {

        return Double.parseDouble( next() );

    }
    static long nextLong() throws IOException{
		return Long.parseLong(next());
	}

	}


import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

import javax.swing.event.TreeExpansionEvent;

public class Contest {
	private static PrintWriter out = new PrintWriter(System.out);
	private static int n, m, k, tc;
	private static int[] a;

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		tc = sc.nextInt();
		while(tc-->0) {
			n = sc.nextInt();
			k = sc.nextInt();
			a = new int[n];
			for(int i = 0;i < n;i++)
				a[i] = sc.nextInt();
			int[] pref = new int[n];
			for(int i = 1;i < n - 1;i++)
				if(a[i-1] < a[i] && a[i] > a[i+1])
					pref[i] = 1;
			for(int i = 1;i < n;i++) {
				pref[i] += pref[i - 1];
			}

			int max_peaks = -1;

			for(int i = 0;i < n - k + 1;i++) {
				max_peaks = Math.max(max_peaks, pref[i + k - 2] - pref[i]);
			}
			int minimal_l = 0;
			for(int i = 0;i < n;i++) {
				if(pref[i + k - 2] - pref[i] == max_peaks) {
					minimal_l = i;
					break;
				}
			}
			out.println(max_peaks+1 + " " + (minimal_l+1));
		}

		out.flush();
	}
	// 0 0 1 1 1 2 2 2 2 2
	// 4 3 4 3 2 3 2 1 0 1
	// 0 1 2 3 4 5 6 7 8 9

	private static void sort(int[] a, int n) {
		ArrayList<Integer> b = new ArrayList<Integer>();
		for (int i = 0; i < n; i++)
			b.add(a[i]);
		Collections.sort(b);
		for (int i = 0; i < n; i++)
			a[i] = b.get(i);
	}

	static final Random random = new Random();

	static void ruffleSort(int[] a) {
		int n = a.length;// shuffle, then sort
		for (int i = 0; i < n; i++) {
			int oi = random.nextInt(n), temp = a[oi];
			a[oi] = a[i];
			a[i] = temp;
		}
		java.util.Arrays.sort(a);
	}

	private static class Scanner {
		public BufferedReader reader;
		public StringTokenizer st;

		public Scanner(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					String line = reader.readLine();
					if (line == null)
						return null;
					st = new StringTokenizer(line);
				} catch (Exception e) {
					throw (new RuntimeException());
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}

}


import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
import java.util.StringTokenizer;
import java.util.TreeSet;

import javax.swing.event.TreeExpansionEvent;

public class Contest {
	private static PrintWriter out = new PrintWriter(System.out);
	private static int n, m, k, tc;
	private static int[] a;

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		tc = sc.nextInt();
		while(tc-->0) {
			n = sc.nextInt();
			k = sc.nextInt();
			a = new int[n];
			for(int i = 0;i < n;i++)
				a[i] = sc.nextInt();
			int l = 0, r = 2, i = 1, prev = -1, ans_l = 0, curPeak = 0;
			ArrayList<Integer> leftPeaks = new ArrayList<Integer>();
			while(r < n) {
				while(r < n && r-l+1<=k) {
					if(a[i] > a[i-1] && a[i] > a[i+1]) {
						curPeak++;
						leftPeaks.add(i - 1);
					}
					r++;
					i++;
				}
				if(curPeak > prev) {
					ans_l = l;
					prev = curPeak;
				}
				if(!leftPeaks.isEmpty() && leftPeaks.get(0)==l) {
					leftPeaks.remove(0);
					curPeak--;
				}
				l++;
			}
			out.println((prev+1) + " " + (ans_l+1));
		}

		out.flush();
	}

	private static void sort(int[] a, int n) {
		ArrayList<Integer> b = new ArrayList<Integer>();
		for (int i = 0; i < n; i++)
			b.add(a[i]);
		Collections.sort(b);
		for (int i = 0; i < n; i++)
			a[i] = b.get(i);
	}

	static final Random random = new Random();

	static void ruffleSort(int[] a) {
		int n = a.length;// shuffle, then sort
		for (int i = 0; i < n; i++) {
			int oi = random.nextInt(n), temp = a[oi];
			a[oi] = a[i];
			a[i] = temp;
		}
		java.util.Arrays.sort(a);
	}

	private static class Scanner {
		public BufferedReader reader;
		public StringTokenizer st;

		public Scanner(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			st = null;
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					String line = reader.readLine();
					if (line == null)
						return null;
					st = new StringTokenizer(line);
				} catch (Exception e) {
					throw (new RuntimeException());
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}

}


import java.util.*;
public class Main {
  public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      int t=sc.nextInt();
      while(t-->0){
          int n=sc.nextInt();
          int k=sc.nextInt();
          int[] arr=new int[n];
          for(int i=0;i<n;i++){
              arr[i]=sc.nextInt();
          }
          helper(arr,k);
      }

  }

  public static void helper(int[] arr,int k){
    int n=arr.length;
    int[] dp=new int[n];
    for(int i=1;i<n-1;i++){
      if(arr[i]>arr[i-1] && arr[i]>arr[i+1]){
        dp[i]=1+dp[i-1];
      }
      else{
        dp[i]=dp[i-1];
      }
    }

    dp[n-1]=dp[n-2];

    int l=0;
    int r=k-1;

    int max_peaks=0;
    int left_bound=1;
    while(r<n){

      int current=dp[r-1]-dp[l];
      if(current>max_peaks){
        max_peaks=current;
        left_bound=l+1;
      }

      l++;
      r++;
    }

    max_peaks+=1;
    System.out.println(max_peaks+" "+left_bound);

  }
}


import java.util.*;
public class Main {
  public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      int t=sc.nextInt();
      while(t-->0){
          int n=sc.nextInt();
          int k=sc.nextInt();
          int[] arr=new int[n];
          for(int i=0;i<n;i++){
              arr[i]=sc.nextInt();
          }
          helper(arr,k);
      }

  }

  public static void helper(int[] arr,int k){
    int n=arr.length;
    int[] dp=new int[n];
    for(int i=1;i<n-1;i++){
      if(arr[i]>arr[i-1] && arr[i]>arr[i+1]){
        dp[i]=1+dp[i-1];
      }
      else{
        dp[i]=dp[i-1];
      }
    }

    dp[n-1]=dp[n-2];

    int l=0;
    int r=k-1;

    int max_peaks=0;
    int left_bound=-1;
    while(r<n){

      int current=dp[r-1]-dp[l];
      if(current>max_peaks){
        max_peaks=current;
        left_bound=l+1;
      }

      l++;
      r++;
    }

    max_peaks+=1;
    System.out.println(max_peaks+" "+left_bound);

  }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Door {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(f.readLine());
        PrintWriter out = new PrintWriter(System.out);
        for (int t1 = 0; t1 < t; t1++) {
            StringTokenizer tokenizer = new StringTokenizer(f.readLine());
            int n = Integer.parseInt(tokenizer.nextToken());
            int l = Integer.parseInt(tokenizer.nextToken()) - 1;
            tokenizer = new StringTokenizer(f.readLine());
            int[] heights = new int[n];
            for (int i = 0; i < n; i++) {
                int num = Integer.parseInt(tokenizer.nextToken());
                heights[i] = num;
            }
            boolean[] isPeak = new boolean[n];
            for (int i = 1; i < n - 1; i++) {
                if (heights[i] > heights[i - 1] && heights[i] > heights[i + 1]) {
                    isPeak[i] = true;
                }
            }

            int[] prefPeaks = new int[n + 1];
            for (int i = 1; i <= n; i++) {
                if (isPeak[i - 1]) {
                    prefPeaks[i]++;
                }
                prefPeaks[i] += prefPeaks[i - 1];
            }

            if (prefPeaks[n] == 0) {
                out.println(1 + " " + 1);
                continue;
            }

            int bestNumOfPeaks = 0;
            int index = -1;
            for (int i = 0; i + l < n; i++) {
                if (prefPeaks[i + l] - prefPeaks[i + 1] > bestNumOfPeaks) {
                    bestNumOfPeaks = prefPeaks[i + l] - prefPeaks[i + 1];
                    index = i;
                }
            }

            out.println((bestNumOfPeaks  + 1) + " " + (index + 1));
        }

        out.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Door {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(f.readLine());
        PrintWriter out = new PrintWriter(System.out);
        for (int t1 = 0; t1 < t; t1++) {
            StringTokenizer tokenizer = new StringTokenizer(f.readLine());
            int n = Integer.parseInt(tokenizer.nextToken());
            int l = Integer.parseInt(tokenizer.nextToken()) - 1;
            tokenizer = new StringTokenizer(f.readLine());
            int[] heights = new int[n];
            for (int i = 0; i < n; i++) {
                int num = Integer.parseInt(tokenizer.nextToken());
                heights[i] = num;
            }
            boolean[] isPeak = new boolean[n];
            for (int i = 1; i < n - 1; i++) {
                if (heights[i] > heights[i - 1] && heights[i] > heights[i + 1]) {
                    isPeak[i] = true;
                }
            }

            int[] prefPeaks = new int[n + 1];
            for (int i = 1; i <= n; i++) {
                if (isPeak[i - 1]) {
                    prefPeaks[i]++;
                }
                prefPeaks[i] += prefPeaks[i - 1];
            }

            if (prefPeaks[n] == 0) {
                out.println(0 + " " + 0);
                continue;
            }

            int bestNumOfPeaks = 0;
            int index = -1;
            for (int i = 0; i + l < n; i++) {
                if (prefPeaks[i + l] - prefPeaks[i + 1] > bestNumOfPeaks) {
                    bestNumOfPeaks = prefPeaks[i + l] - prefPeaks[i + 1];
                    index = i;
                }
            }

            out.println((bestNumOfPeaks  + 1) + " " + (index + 1));
        }

        out.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Door {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(f.readLine());
        PrintWriter out = new PrintWriter(System.out);
        for (int t1 = 0; t1 < t; t1++) {
            StringTokenizer tokenizer = new StringTokenizer(f.readLine());
            int n = Integer.parseInt(tokenizer.nextToken());
            int l = Integer.parseInt(tokenizer.nextToken());
            tokenizer = new StringTokenizer(f.readLine());
            int[] heights = new int[n];
            for (int i = 0; i < n; i++) {
                int num = Integer.parseInt(tokenizer.nextToken());
                heights[i] = num;
            }
            boolean[] isPeak = new boolean[n];
            for (int i = 1; i < n - 1; i++) {
                if (heights[i] > heights[i - 1] && heights[i] > heights[i + 1]) {
                    isPeak[i] = true;
                }
            }
            int[] prefPeaks = new int[n + 1];
            for (int i = 1; i <= n; i++) {
                if (isPeak[i - 1]) {
                    prefPeaks[i]++;
                }
                prefPeaks[i] += prefPeaks[i - 1];
            }

            int bestNumOfPeaks = 0;
            int index = -1;
            for (int i = 1; i + l - 1 <= n; i++) {
                if (prefPeaks[i + l - 2] - prefPeaks[i] > bestNumOfPeaks) {
                    bestNumOfPeaks = prefPeaks[i + l - 2] - prefPeaks[i];
                    index = i;
                }
            }

            out.println((bestNumOfPeaks + 1) + " " + index);
        }

        out.close();
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Door {
    public static void main(String[] args) throws IOException {
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(f.readLine());
        PrintWriter out = new PrintWriter(System.out);
        for (int t1 = 0; t1 < t; t1++) {
            StringTokenizer tokenizer = new StringTokenizer(f.readLine());
            int n = Integer.parseInt(tokenizer.nextToken());
            int l = Integer.parseInt(tokenizer.nextToken()) - 1;
            tokenizer = new StringTokenizer(f.readLine());
            int[] heights = new int[n];
            for (int i = 0; i < n; i++) {
                int num = Integer.parseInt(tokenizer.nextToken());
                heights[i] = num;
            }
            boolean[] isPeak = new boolean[n];
            for (int i = 1; i < n - 1; i++) {
                if (heights[i] > heights[i - 1] && heights[i] > heights[i + 1]) {
                    isPeak[i] = true;
                }
            }

            int[] prefPeaks = new int[n + 1];
            for (int i = 1; i <= n; i++) {
                if (isPeak[i - 1]) {
                    prefPeaks[i]++;
                }
                prefPeaks[i] += prefPeaks[i - 1];
            }

            if (prefPeaks[n] == 0) {
                out.println(0 + " " + 1);
                continue;
            }

            int bestNumOfPeaks = 0;
            int index = -1;
            for (int i = 0; i + l < n; i++) {
                if (prefPeaks[i + l] - prefPeaks[i + 1] > bestNumOfPeaks) {
                    bestNumOfPeaks = prefPeaks[i + l] - prefPeaks[i + 1];
                    index = i;
                }
            }

            out.println((bestNumOfPeaks  + 1) + " " + (index + 1));
        }

        out.close();
    }
}


import java.util.*;
import java.io.*;
public class GFG {
   public static void main (String[] args) {
		Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int t=sc.nextInt();
		while (t-->0){
		   int n=sc.nextInt();
		   int k=sc.nextInt();
		   int[] arr=new int[n];
		   for(int i=0;i<n;i++)
		   arr[i]=sc.nextInt();
		   int[] pre=new int[n];
		   int[] a=new int[n];
		   for(int i=1;i<n-1;i++)
		   {
		       if(arr[i]>arr[i-1]&&arr[i]>arr[i+1]){
		       pre[i]=1;a[i]=1;}
		       a[i]+=a[i-1];
		   }
		   a[n-1]+=a[n-2];
		   int ans=a[k-1],left=0;
		   if(pre[0]==1)
		   ans--;
		   if(pre[k-1]==1)
		   ans--;
		   int max=ans;
		   for(int i=k;i<n;i++)
		   {
		       ans=a[i]-a[i-k];
		       if(pre[i]==1)
		       ans--;
		       if(pre[i-k+1]==1)
		       ans--;
		       if(ans>max)
		       {max=ans;left=i-k+1;}
		   }
		   out.println((max+1)+" "+(left+1));
		   out.flush();
		}
   }
}


import java.util.*;
import java.io.*;
public class GFG {
   public static void main (String[] args) {
		Scanner sc=new Scanner(System.in);
		PrintWriter out=new PrintWriter(System.out);
		int t=sc.nextInt();
		while (t-->0){
		   int n=sc.nextInt();
		   int k=sc.nextInt();
		   int[] arr=new int[n];
		   for(int i=0;i<n;i++)
		   arr[i]=sc.nextInt();
		   int[] pre=new int[n];
		   int[] a=new int[n];
		   for(int i=1;i<n-1;i++)
		   {
		       if(arr[i]>arr[i-1]&&arr[i]>arr[i+1]){
		       pre[i]=1;a[i]=1;}
		       a[i]+=a[i-1];
		   }
		   a[n-1]+=a[n-2];
		   int ans=a[k-1],left=0;
		   if(pre[0]==1)
		   ans--;
		   if(pre[k-1]==1)
		   ans--;
		   int max=ans;
		   for(int i=k;i<n;i++)
		   {
		       ans=a[i]-a[i-k];
		       if(pre[i]==1)
		       ans--;
		       if(pre[i-k]==1)
		       ans--;
		       if(ans>max)
		       {max=ans;left=i-k+1;}
		   }
		   out.println((max+1)+" "+(left+1));
		   out.flush();
		}
   }
}


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
 */
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);
        BNastyaAndDoor solver = new BNastyaAndDoor();
        solver.solve(1, in, out);
        out.close();
    }

    static class BNastyaAndDoor {
        public void solve(int testNumber, FastReader s, PrintWriter out) {
            int t = s.nextInt();
            while (t-- > 0) {
                int n = s.nextInt();
                long k = s.nextLong();
                long[] arr = s.nextLongArray(n);
                boolean[] isPeak = new boolean[n];

                long[] peaksTillNow = new long[n];
                for (int i = 1; i < arr.length - 1; i++) {
                    if (arr[i] > arr[i + 1] && arr[i] > arr[i - 1]) {
                        isPeak[i] = true;
                    }
                }

                for (int i = 1; i < n; i++) {
                    peaksTillNow[i] = ((isPeak[i]) ? 1L : 0L) + peaksTillNow[i - 1];
                }

                long maxPeaks = 0, start = 0L;
                for (long i = 0; i < n; i++) {
                    if (i + k - 1L >= n) {
                        break;
                    }
                    long maxVal = peaksTillNow[(int) (i + k - 1)] - peaksTillNow[(int) i];

                    if (isPeak[(int) (i + k - 1)]) {
                        maxVal--;
                    }
                    if (maxPeaks < maxVal) {
                        maxPeaks = maxVal;
                        start = i;
                    }
                }

                out.println((maxPeaks + 1) + " " + (start + 1L));
            }
        }

    }

    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 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 boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public long[] nextLongArray(int n) {
            long[] array = new long[n];
            for (int i = 0; i < n; ++i) array[i] = nextLong();
            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
 */
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);
        BNastyaAndDoor solver = new BNastyaAndDoor();
        solver.solve(1, in, out);
        out.close();
    }

    static class BNastyaAndDoor {
        public void solve(int testNumber, FastReader s, PrintWriter out) {
            int t = s.nextInt();
            while (t-- > 0) {
                int n = s.nextInt();
                long k = s.nextLong();
                long[] arr = s.nextLongArray(n);
                boolean[] isPeak = new boolean[n];
                for (int i = 1; i < arr.length - 1; i++) {
                    if (arr[i] > arr[i + 1] && arr[i] > arr[i - 1]) {
                        isPeak[i] = true;
                    }
                }

                long i = 0L;
                long startJ = i + k - 1L;
                long totalPeaks = 0L;

                long j = 1L;
                while (j < startJ) {
                    if (isPeak[(int) j]) {
                        totalPeaks++;
                    }
                    j++;
                }

//            j++;
                long maxPeaks = totalPeaks;
                long maxStart = 0L;

                while (j < n) {
                    if (isPeak[(int) i]) {
                        totalPeaks--;
                    }

                    if (isPeak[(int) j]) {
                        totalPeaks++;
                    }

                    if (totalPeaks > maxPeaks) {
                        maxPeaks = totalPeaks;
                        maxStart = i + 1L;
                    }
                    i++;
                    j++;
                }

                out.println((maxPeaks + 1) + " " + (maxStart + 1L));
            }
        }

    }

    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 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 boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public long[] nextLongArray(int n) {
            long[] array = new long[n];
            for (int i = 0; i < n; ++i) array[i] = nextLong();
            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.util.Collections;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
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);
        BNastyaAndDoor solver = new BNastyaAndDoor();
        solver.solve(1, in, out);
        out.close();
    }

    static class BNastyaAndDoor {
        public void solve(int testNumber, FastReader s, PrintWriter out) {
            int t = s.nextInt();
            while (t-- > 0) {
                int n = s.nextInt();
                long k = s.nextLong();
                long[] arr = s.nextLongArray(n);
                ArrayList<Long> peaks = new ArrayList<>();
                for (int i = 1; i < arr.length - 1; i++) {
                    if (arr[i] > arr[i + 1] && arr[i] > arr[i - 1]) {
                        peaks.add((long) (i + 1));
                    }
                }

                long maxSize = 0L;
                long maxStart = 1L;
                for (int i = 1; i <= n; i++) {
                    long currStart = i;
                    long toFind = Collections.binarySearch(peaks, currStart + k - 1L);
                    if (toFind < 0) {
                        toFind = (toFind + 1L) * -1L;
                    }

                    long peaksLessThanI = Collections.binarySearch(peaks, currStart);
                    if (peaksLessThanI < 0) {
                        peaksLessThanI = (peaksLessThanI + 1L) * -1L;
                    }

                    if (toFind - peaksLessThanI > maxSize) {
                        maxSize = toFind - peaksLessThanI;
                        maxStart = i;
                    }
                }

                out.println((maxSize + 1) + " " + (maxStart));

            }
        }

    }

    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 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 boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public long[] nextLongArray(int n) {
            long[] array = new long[n];
            for (int i = 0; i < n; ++i) array[i] = nextLong();
            return array;
        }

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

        }

    }
}


import java.util.*;
public class Solution{
     public static void main(String [] args)
	    	{
	    	 Scanner x=new Scanner(System.in);
	    	 int t=x.nextInt();
	    	 while(t>0)
	    	 {
	    		 int n=x.nextInt();
	    		 int k=x.nextInt();
	    		 int a[]=new int[n];
	    		 for(int i=0;i<n;i++)
	    			 a[i]=x.nextInt();
	    		int peaks[]=new int[n];
	    		HashMap<Integer,Integer> m=new HashMap<>();
	    		for(int i=1;i<n-1;i++)
	    		{
	    			if(a[i]>a[i-1] && a[i]>a[i+1])
	    				{peaks[i]=1;
	    				 m.put(i, 1);
	    				}
	    		}
	    		for(int i=1;i<n;i++)
	    		{

	    				peaks[i]+=peaks[i-1];

	    		}
	    		ArrayList<Integer> temp=new ArrayList<>(m.keySet());
	    		/*for(int i=0;i<temp.size();i++)
	    			peaks[temp.get(i)]=0;*/

	    		int max=-1;
	    		int pos=0;
	    		for(int i=0;i<=n-k;i++)
	    		{
	    			if(peaks[i+k-1]-peaks[i]>max)
	    			{ if(!m.containsKey(i) && !m.containsKey(i+k-1))
	    				{max=peaks[i+k-1]-peaks[i];
	    				pos=i+1;
	    				}
	    			}
	    		}
	    		if(max==-1)
	    		{
	    			System.out.println("0"+" "+"0");
	    		}
	    		else

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

	    		 t--;
	    	 }
	    	}
}


import java.util.*;

public class Solution{
    public static void main(String [] args)
	    	{
	    	 Scanner x=new Scanner(System.in);
	    	 int t=x.nextInt();
	    	 while(t>0)
	    	 {
	    		 int n=x.nextInt();
	    		 int k=x.nextInt();
	    		 int a[]=new int[n];
	    		 for(int i=0;i<n;i++)
	    			 a[i]=x.nextInt();
	    		int peaks[]=new int[n];
	    		HashMap<Integer,Integer> m=new HashMap<>();
	    		for(int i=1;i<n;i++)
	    		{
	    			peaks[i]+=peaks[i-1];

	    			if(i!=n-1)
	    			 if(a[i]>a[i-1] && a[i]>a[i+1])
	    				 peaks[i]++;
	    		}
	    		/*for(int i=1;i<n;i++)
	    		{

	    				peaks[i]+=peaks[i-1];

	    		}*/
	    		//ArrayList<Integer> temp=new ArrayList<>(m.keySet());
	    		/*for(int i=0;i<temp.size();i++)
	    			peaks[temp.get(i)]=0;*/
	    		int max=0;int pos=0;
	    		for(int i=0;i<n-k+1;i++)
	    		{
	    			int rside=i+k-1;
	    			int temp=peaks[rside-1]-peaks[i];
	    			if(temp>max)
	    			{
	    				max=temp;
	    				pos=i;
	    			}
	    		}
	    		System.out.println((max+1)+" "+(pos+1));
	    		/*int max=-1;
	    		int pos=0;
	    		for(int i=0;i<=n-k;i++)
	    		{
	    			if(peaks[i+k-1]-peaks[i]>max)
	    			{ if(!m.containsKey(i) && !m.containsKey(i+k-1))
	    				{max=peaks[i+k-1]-peaks[i];
	    				pos=i+1;
	    				}
	    			}
	    		}
	    		if(max==0)
	    		{
	    			System.out.println((max)+" "+"0");
	    		}
	    		else

	    		System.out.println((max+1)+" "+pos);
*/
	    		 t--;
	    	 }
	    	}
}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
        {
            cin >> arr[i];
        }
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(freq[r-1]-freq[l]>min)
            {
                pos=l+1;
                min=freq[r-1]-freq[l];
            }
        }
        if(pos==-1)
            cout << 0 << " " << 1;
        else
            cout << min+1 << " " << pos << '\n';
    }

}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
        {
            cin >> arr[i];
        }
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(freq[r-1]-freq[l]>min)
            {
                pos=l+1;
                min=freq[r-1]-freq[l];
            }
        }
        if(pos==-1)
            cout << 0 << " " << 0;
        else
            cout << min+1 << " " << pos << '\n';
    }

}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
            cin >> arr[i];
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        freq[n-1]=cnt;
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(freq[r-1]-freq[l+1]>min)
            {
                pos=l+1;
                min=freq[r-1]-freq[l];
            }
        }
        if(pos==-1)
            cout << 1 << " " << 1 << '\n';
        else
            cout << min+1 << " " << pos << '\n';
    }

}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
            cin >> arr[i];
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        freq[n-1]=cnt;
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(freq[r-1]-freq[l]>min)
            {
                pos=l+1;
                min=freq[r-1]-freq[l];
            }
        }
        if(pos==-1)
            cout << 1 << " " << 1;
        else
            cout << min+1 << " " << pos << '\n';
    }
}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
        {
            cin >> arr[i];
        }
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        int min=0,pos;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(freq[r-1]-freq[l]>min)
            {
                pos=l+1;
                min=freq[r-1]-freq[l];
            }
        }
        cout << min+1 << " " << pos << '\n';
    }

}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
        {
            cin >> arr[i];
        }
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        int min=0,pos=-1;
        if(k==1)
        {
            int cn=0;
            for(int i=1;i<n-1;i++)
            {
                if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                {
                    cout << 1 << " " << i+1 << '\n';
                    cn=1;
                    break;
                }
            }
            if(cn==0)
            {
                cout << 0 << " " << 1 << '\n';
            }
        }
        else
        {
            for(ll i=0;i<=n-k;i++)
            {
                int l=i,r=i+k-1;
                if(r==l)
                {
                    if(freq[l]>min)
                    {
                        pos=l+1;
                        min=freq[l];
                    }
                }
                else
                {
                    if(freq[r-1]-freq[l]>min)
                    {
                        pos=l+1;
                        min=freq[r-1]-freq[l];
                    }
                }
            }
            if(pos==-1)
                cout << 0 << " " << 1;
            else
                cout << min+1 << " " << pos << '\n';
        }
    }

}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
        {
            cin >> arr[i];
        }
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(r==l)
            {
                if(freq[l]>min)
                {
                    pos=l+1;
                    min=freq[l];
                }
            }
            else
            {
                if(freq[r-1]-freq[l]>min)
                {
                    pos=l+1;
                    min=freq[r-1]-freq[l];
                }
            }
        }
        if(pos==-1)
            cout << 1 << " " << 1;
        else
            cout << min+1 << " " << pos << '\n';
    }
}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
        {
            cin >> arr[i];
        }
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(r==l)
            {
                if(freq[l]>min)
                {
                    pos=l+1;
                    min=freq[l];
                }
            }
            else
            {
                if(freq[r-1]-freq[l]>min)
                {
                    pos=l+1;
                    min=freq[r-1]-freq[l];
                }
            }
        }
        if(pos==-1)
            cout << 1 << " " << 1;
        else
            cout << min+1 << " " << pos << '\n';
    }

}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
            cin >> arr[i];
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        freq[n-1]=cnt;
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(freq[r-1]-freq[l+1]>min)
            {
                pos=l+1;
                min=freq[r-1]-freq[l];
            }
        }
        if(pos==-1)
            cout << 1 << " " << 1;
        else
            cout << min+1 << " " << pos << '\n';
    }

}


#include<bits/stdc++.h>
#include<algorithm>
#include<sstream>

#define ll long long
#define mod 10000000

#define fastIO() do {ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);} while (0)

using namespace std;

ll max(ll a,ll b)
{
	return (a>b) ?a :b ;
}

ll max(ll a,ll b,ll c)
{
	return  max(max(a,b),c);
}

ll min(ll a,ll b)
{
	return (a<b) ?a :b ;
}

ll min(ll a,ll b,ll c)
{
	return  min(min(a,b),c);
}

int gcd(int a,int b)
{
	return (b)?gcd(b,a%b):a;
}

ll factorial(ll n)
{
	ll fact=1;
	for(ll i=1;i<=n;i++)
		fact*=i;
	return fact;
}

int power(int x, unsigned int y, int p)
{
    int res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

ll printNcR(ll n, ll r)
{
    long long p = 1, k = 1;
    if (n - r < r)
        r = n - r;

    if (r != 0) {
        while (r) {
            p *= n;
            k *= r;
            long long m = __gcd(p, k);
            p /= m;
            k /= m;

            n--;
            r--;
        }
    }

    else
        p = 1;

    return p;
}

vector<int>prime;
void sieve(){
int arr[10000001]={0};
    for(int i=2;i*i<=1000000;i++)
    {
        if(arr[i]==0)
        {
            for(int j=i*i;j<=1000000;j+=i)
                arr[j]=1;
        }
    }
    for(int i=2;i<=1000000;i++)
    {
        if(arr[i]==0)
            prime.push_back(i);
    }
}

// struct custom_hash {
//     static uint64_t splitmix64(uint64_t x) {
//         // http://xorshift.di.unimi.it/splitmix64.c
//         x += 0x9e3779b97f4a7c15;
//         x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
//         x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
//         return x ^ (x >> 31);
//     }

//     size_t operator()(uint64_t x) const {
//         static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
//         return splitmix64(x + FIXED_RANDOM);
//     }
// };
ll binarySearch(vector<string>&arr, string x,ll n){
    int l = 0 ;
    int r = n - 1;
    while (l <= r)  {
        int m = l + (r - l) / 2;
    int res;
    if (x == (arr[m]))
        res = 0;
        if (res == 0)
            return m;
        if (x > (arr[m]))
            l = m + 1;
        else
            r = m - 1;
    }

    return -1;
}
int main()
{
    //CALL sieve() TO GET PRIME NUMNERS BETWEEN 1 TO 10^7 STORED IN primes VECTOR
    //CALL power(x,y,p) TO CALCULATE (X^Y) MOD P
    //CALL max(a,b) to get larger int among a and b
    //CALL max(a,b,c) to get larger int among a and b and c
    //CALL min(a,b) to get smallest int among a and b
    //CALL min(a,b,c) to get smallest int among a and b and c
    //string.substr(beginposition, lengthofsubstring)
    //CALL copy(from_begin, from_end, to_begin) to copy from the from container to to container or copy(all(from), to_begin);
    //To find the intersection of two containers end_result = set_intersection(begin1, end1, begin2, end2, begin_result)
    //To find the union of two containers end_result = set_union(begin1, end1, begin2, end2, begin_result)
    //To find the difference of two containers end_result = set_difference(begin1, end1, begin2, end2, begin_result)
    //To find the set symmetric difference of two containers end_result = set_symmetric_difference(…)
    //TO get the sum of all elements in container v int sum = accumulate(all(v), (long long)0)
    //TO get the product of all elements in container v double product = accumulate(all(v), double(1), multiplies< double >())
    // Vector will not enlarge on push_back() operations until the size specified by reserve() will be reached v.reserve(1050)
    // Use unordered_map<customhash>m
    fastIO();
    ll t;
    cin >> t;
    while(t--)
    {
        ll n,k;
        cin >> n >> k;
        ll arr[n],freq[n]={0};
        for(ll i=0;i<n;i++)
            cin >> arr[i];
        ll cnt=0;
        for(ll i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
                cnt++;
            freq[i]=cnt;
        }
        freq[n-1]=cnt;
        int min=0,pos=-1;
        for(ll i=0;i<=n-k;i++)
        {
            int l=i,r=i+k-1;
            if(freq[r-1]-freq[l]>min)
            {
                pos=l+1;
                min=freq[r-1]-freq[l];
            }
        }
        if(pos==-1)
            cout << 1 << " " << 1 << '\n';
        else
            cout << min+1 << " " << pos << '\n';
    }

}


#include<bits/stdc++.h>
using namespace std;

#define sz 200005
#define ll long long

ll arr[sz],cums[sz];

int main()
{
    ll t,n,k;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        cums[0]=0;
        for(ll i=1;i<=n;i++)
        {
            cin>>arr[i];
            cums[i]=0;
        }

        for(ll i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
                cums[i+1]=1;
        }

        for(ll i=1;i<=n;i++)cums[i]+=cums[i-1];

        ll l,r,mx=0,idx;
        for(ll i=1;i<=(n-k+1);i++)
        {
            l=i,r=l+k-1;
            if((cums[r]-cums[l+1])>mx)
            {
                mx=cums[r]-cums[l+1];
                idx=i;
            }
        }
        cout<<(mx+1)<<" "<<idx<<"\n";
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
//const ll sz = 2e5;

ll arr[200005],csum[200005];

int main()
{
    ll t,n,k,i;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        for(i=1;i<=n;i++)
        {
            cin>>arr[i];
        }

        for(i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
            {
                csum[i]=1;
            }
        }

        for(i=2;i<=n;i++)
        {
            csum[i]=csum[i]+csum[i-1];
        }

        ll mx=0,idx=1;
        for(i=1;i<=(n-k+1);i++)
        {
            ll l,r;
            l=i,r=l+k-1;
            if(mx<(csum[r]-csum[l]))
            {
                mx=csum[r]-csum[l];
                if(l>1 && (arr[l-1]<arr[l] && arr[l]>arr[l+1]) ||
                    (arr[r-1]<arr[r] && arr[r]>arr[r+1]))
                idx=i+1;
                    else idx=i;
            }
        }
        cout<<(mx+1)<<" "<<idx<<"\n";
        for(ll i=1;i<=n;i++) csum[i]=0;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
const ll sz = 2e5;

ll arr[sz],csum[sz];

int main()
{
    ll t,n,k,i;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        for(i=1;i<=n;i++)
        {
            cin>>arr[i];
        }

        for(i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
            {
                csum[i]=1;
            }
        }

        for(i=2;i<=n;i++)
        {
            csum[i]=csum[i]+csum[i-1];
        }

        ll mx=0,idx;
        for(i=1;i<=(n-k+1);i++)
        {
            ll l,r;
            l=i,r=l+k-1;
            if(mx<(csum[r]-csum[l]))
            {
                mx=csum[r]-csum[l];
                if(l>1 && (arr[l-1]<arr[l] && arr[l]>arr[l+1]) ||
                    (arr[r-1]<arr[r] && arr[r]>arr[r+1]))
                idx=i+1;
                    else idx=i;
            }
        }
        cout<<(mx+1)<<" "<<(idx)<<"\n";
        for(ll i=1;i<=n;i++) csum[i]=0;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
//const ll sz = 2e5;

ll arr[200005],csum[200005];

int main()
{
    ll t,n,k,i;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        for(i=1;i<=n;i++)
        {
            cin>>arr[i];
        }

        for(i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
            {
                csum[i]=1;
            }
        }

        for(i=2;i<=n;i++)
        {
            csum[i]=csum[i]+csum[i-1];
        }

        ll mx=0,idx=1;
        for(i=1;i<=(n-k+1);i++)
        {
            ll l,r;
            l=i,r=l+k-1;
            if(mx<(csum[r]-csum[l]))
            {
                mx=csum[r]-csum[l-1];
                idx=i;
            }
        }
        cout<<(mx+1)<<" "<<idx<<"\n";
        for(ll i=1;i<=n;i++) csum[i]=0;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
//const ll sz = 2e5;

ll arr[200005],csum[200005];

int main()
{
    ll t,n,k,i;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        for(i=1;i<=n;i++)
        {
            cin>>arr[i];
        }

        for(i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
            {
                csum[i]=1;
            }
        }

        for(i=2;i<=n;i++)
        {
            csum[i]=csum[i]+csum[i-1];
        }

        ll mx=0,idx=1;
        for(i=1;i<=(n-k+1);i++)
        {
            ll l,r;
            l=i,r=l+k-1;
            if(mx<(csum[r]-csum[l]))
            {
                mx=csum[r]-csum[l-1];
                if(l>1 && (arr[l-1]<arr[l] && arr[l]>arr[l+1]) ||
                    (arr[r-1]<arr[r] && arr[r]>arr[r+1]))
                idx=i+1;
                    else idx=i;
            }
        }
        cout<<(mx+1)<<" "<<idx<<"\n";
        for(ll i=1;i<=n;i++) csum[i]=0;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
//const ll sz = 2e5;

ll arr[200005],csum[200005];

int main()
{
    ll t,n,k,i;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        for(i=1;i<=n;i++)
        {
            cin>>arr[i];
        }

        for(i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
            {
                csum[i]=1;
            }
        }

        for(i=2;i<=n;i++)
        {
            csum[i]=csum[i]+csum[i-1];
        }

        ll mx=0,idx=1;
        for(i=1;i<=(n-k+1);i++)
        {
            ll l,r;
            l=i,r=l+k-1;
            if(mx<(csum[r-1]-csum[l]))
            {
                mx=csum[r-1]-csum[l];
                idx=i;
            }
        }
        cout<<(mx+1)<<" "<<idx<<"\n";
        for(ll i=1;i<=n;i++) csum[i]=0;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
//const ll sz = 2e5;

ll arr[200005],csum[200005];

int main()
{
    ll t,n,k,i;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        for(i=1;i<=n;i++)
        {
            cin>>arr[i];
        }

        for(i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
            {
                csum[i]=1;
            }
        }

        for(i=2;i<=n;i++)
        {
            csum[i]=csum[i]+csum[i-1];
        }

        ll mx=0,idx;
        for(i=1;i<=(n-k+1);i++)
        {
            ll l,r;
            l=i,r=l+k-1;
            if(mx<(csum[r]-csum[l]))
            {
                mx=csum[r]-csum[l];
                if(l>1 && (arr[l-1]<arr[l] && arr[l]>arr[l+1]) ||
                    (arr[r-1]<arr[r] && arr[r]>arr[r+1]))
                idx=i+1;
                    else idx=i;
            }
        }
        cout<<(mx+1)<<" "<<idx<<"\n";
        for(ll i=1;i<=n;i++) csum[i]=0;
    }
}


#include<bits/stdc++.h>
using namespace std;

#define sz 200005
#define ll long long

ll arr[sz],cums[sz];

int main()
{
    ll t,n,k;
    cin>>t;

    while(t--)
    {
        cin>>n>>k;

        cums[0]=0;
        for(ll i=1;i<=n;i++)
        {
            cin>>arr[i];
            cums[i]=0;
        }

        for(ll i=2;i<n;i++)
        {
            if(arr[i-1]<arr[i] && arr[i]>arr[i+1])
                cums[i+1]=1;
        }

        for(ll i=1;i<=n;i++)cums[i]+=cums[i-1];

        ll l,r,mx=0,idx=1;
        for(ll i=1;i<=(n-k+1);i++)
        {
            l=i,r=l+k-1;
            if((cums[r]-cums[l+1])>mx)
            {
                mx=cums[r]-cums[l+1];
                idx=i;
            }
        }
        cout<<(mx+1)<<" "<<idx<<"\n";
    }
}


t = int(input())
n, k = map(int, input().split())
arr = list(map(int, input().split()))
buff = list()
peak_count = 0
peak_count_max = 0
index_peak_count
for i in range(k - 1):
	if (arr[i-1] < arr[i] and arr[i] > arr[i+1]):
		peakcount
	buff.append(arr[i])


#include <iostream>
using namespace std;

const int MAXSIZE = 200010;
long a[MAXSIZE];
long mask[MAXSIZE];
long t, n, k;
long max_sum_i;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> t;
    for (int j = 0; j < t; ++j){
        cin >> n >> k;
        cin >> a[0];
        cin >> a[1];
        for (int i = 2; i < n; ++i){
            cin >> a[i];
            if (a[i] < a[i-1] && a[i-1] > a[i-2]){
                mask[i] = 1;
            }
            else{
                mask[i] = 0;
            }
        }
        max_sum_i = 0;
        a[0] = 0; //0 1 2 3 4 5(k-1) 6 7
        // 1 2 4 1 2 4 1(a[7]) 2
        // 0 0 1 0 0 1 0       0
        for (int i = 0; i < n; ++i){
            a[i] = mask[i];
            a[i] += a[i-1];
            if (i >= k - 1){
                a[i] -= a[i - (k - 1)];
                if (a[i] > a[max_sum_i]){
                    max_sum_i = i;
                }
            }
        }
        cout << 1 + a[max_sum_i] << " " << max_sum_i - k + 2 << endl;
    }
    return 0;
}