Masha works in an advertising agency. In order to promote the new brand, she wants to conclude contracts with some bloggers. In total, Masha has connections of n different bloggers. Blogger numbered i has a_i followers.

Since Masha has a limited budget, she can only sign a contract with k different bloggers. Of course, Masha wants her ad to be seen by as many people as possible. Therefore, she must hire bloggers with the maximum total number of followers.

Help her, find the number of ways to select k bloggers so that the total number of their followers is maximum possible. Two ways are considered different if there is at least one blogger in the first way, which is not in the second way. Masha believes that all bloggers have different followers (that is, there is no follower who would follow two different bloggers).

For example, if n=4, k=3, a=[1, 3, 1, 2], then Masha has two ways to select 3 bloggers with the maximum total number of followers: 

  * conclude contracts with bloggers with numbers 1, 2 and 4. In this case, the number of followers will be equal to a_1 + a_2 + a_4 = 6. 
  * conclude contracts with bloggers with numbers 2, 3 and 4. In this case, the number of followers will be equal to a_2 + a_3 + a_4 = 6. 



Since the answer can be quite large, output it modulo 10^9+7.

Input

The first line contains one integer t (1 ≤ t ≤ 1000) — the number of test cases. Then t test cases follow.

The first line of each test case contains two integers n and k (1 ≤ k ≤ n ≤ 1000) — the number of bloggers and how many of them you can sign a contract with.

The second line of each test case contains n integers a_1, a_2, … a_n (1 ≤ a_i ≤ n) — the number of followers of each blogger.

It is guaranteed that the sum of n over all test cases does not exceed 1000.

Output

For each test case, on a separate line output one integer — the number of ways to select k bloggers so that the total number of their followers is maximum possible.

Example

Input


3
4 3
1 3 1 2
4 2
1 1 1 1
2 1
1 2


Output


2
6
1

Note

The test case is explained in the statements.

In the second test case, the following ways are valid: 

  * conclude contracts with bloggers with numbers 1 and 2. In this case, the number of followers will be equal to a_1 + a_2 = 2; 
  * conclude contracts with bloggers with numbers 1 and 3. In this case, the number of followers will be equal to a_1 + a_3 = 2; 
  * conclude contracts with bloggers with numbers 1 and 4. In this case, the number of followers will be equal to a_1 + a_4 = 2; 
  * conclude contracts with bloggers with numbers 2 and 3. In this case, the number of followers will be equal to a_2 + a_3 = 2; 
  * conclude contracts with bloggers with numbers 2 and 4. In this case, the number of followers will be equal to a_2 + a_4 = 2; 
  * conclude contracts with bloggers with numbers 3 and 4. In this case, the number of followers will be equal to a_3 + a_4 = 2. 



In the third test case, the following ways are valid: 

  * concludes a contract with a blogger with the number 2. In this case, the number of followers will be equal to a_2 = 2. 
/*input
1
50 44
43 43 43 43 43 37 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43 43


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

public class Main
{
	static PrintWriter out;
	static int MOD = 1000000007;
	static FastReader scan;

    /*-------- I/O using short named function ---------*/
	public static String ns(){return scan.next();}
	public static int ni(){return scan.nextInt();}
	public static long nl(){return scan.nextLong();}
	public static double nd(){return scan.nextDouble();}
	public static String nln(){return scan.nextLine();}
	public static void p(Object o){out.print(o);}
	public static void ps(Object o){out.print(o + " ");}
	public static void pn(Object o){out.println(o);}
    /*-------- for output of an array ---------------------*/
     static void iPA(int arr []){
     	 StringBuilder output = new StringBuilder();
	     for(int i=0; i<arr.length; i++)output.append(arr[i] + " ");out.println(output);
	}
	static void lPA(long arr []){
	     StringBuilder output = new StringBuilder();
	     for(int i=0; i<arr.length; i++)output.append(arr[i] + " ");out.println(output);
	}
	static void sPA(String arr []){
	     StringBuilder output = new StringBuilder();
	     for(int i=0; i<arr.length; i++)output.append(arr[i] + " ");out.println(output);
	}
	static void dPA(double arr []){
	     StringBuilder output = new StringBuilder();
	     for(int i=0; i<arr.length; i++)output.append(arr[i] + " ");out.println(output);
	}
    /*-------------- for input in an array ---------------------*/
	static void iIA(int arr[]){
	     for(int i=0; i<arr.length; i++)arr[i] = ni();
	}
	static void lIA(long arr[]){
	     for(int i=0; i<arr.length; i++)arr[i] = nl(); 
	}
	static void sIA(String arr[]){
	     for(int i=0; i<arr.length; i++)arr[i] = ns(); 
	}
	static void dIA(double arr[]){
	     for(int i=0; i<arr.length; i++)arr[i] = nd();
	}
	/*------------ for taking input faster ----------------*/
     static class FastReader
	{
		BufferedReader br;
		StringTokenizer st;

		public FastReader()
		{
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next()
		{
			while (st == null || !st.hasMoreElements())
			{
				try
				{
					st = new StringTokenizer(br.readLine());
				}
				catch (IOException e)
				{
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

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

		String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
	}

	// Method to check if x is power of 2
    static boolean isPowerOfTwo (int x) { return x!=0 && ((x&(x-1)) == 0);}
    //Method to return lcm of two numbers
    static int gcd(int a, int b){return a==0?b:gcd(b % a, a); }
    // method to return LCM of two numbers
    static int lcm(int a, int b){return (a / gcd(a, b)) * b;}
    //Method to count digit of a number
    static int countDigit(long n){return (int)Math.floor(Math.log10(n) + 1);}

    //Method to find the max in an array
    static int getMax(int arr[]){
    	int max = arr[0];
    	for(int i=0; i<arr.length; i++){
    		max = arr[i]>max?arr[i]:max;
    	}
    	return max;
    }
    //Method to find the min in an array
    static int getMin(int arr[]){
    	int min = arr[0];
    	for(int i=0; i<arr.length; i++){
    		min = min>arr[i]?arr[i]:min;
    	}
    	return min;
    }
    //Method for sorting
	static void ruffle_sort(int[] a) {
		//shandom_ruffle
		Random r=new Random();
		int n=a.length;
		for (int i=0; i<n; i++) {
			int oi=r.nextInt(n);
			int temp=a[i];
			a[i]=a[oi];
			a[oi]=temp;
		}
		
		//sort
		Arrays.sort(a);
	}
	static int inv[];
	static int Maxn = 100001, Mod = 1000000007; 

    static int fact[]; 


static int ifact[]; 
	public static void main (String[] args) throws java.lang.Exception
	{
		OutputStream outputStream =System.out;
        out =new PrintWriter(outputStream);
        scan =new FastReader();
        inv = new int[Maxn];
        fact = new int[Maxn];
        ifact = new int[Maxn];
		//for fast output sometimes
		StringBuilder sb = new StringBuilder();
		int t = ni();
		while(t-->0){
			int n = ni(), k = ni();
			TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
			
			for(int i=0; i<n; i++){
				int val = ni();
				map.put(-val, map.getOrDefault(-val, 0) + 1);
			}
			int j=0;
			long ans=1;
			for(Map.Entry mapElement : map.entrySet()){
				int key =(int) mapElement.getKey();
				int value =(int) mapElement.getValue();
				//pn(nCk(50, 43));
				int b = Math.min(value, k);
					if(k>0){
						ans = (ans%MOD * nCr(value, b)%MOD)%MOD;
						k-=b;
					}else
					break;
					
				
			}
			pn(ans);
        }
        out.flush();
		out.close();
	}

	static long mul(long a, long b){
		return (a%MOD * b%MOD)%MOD;
	}
	static long fact(long n){
		long ans=1;
		for(int i=2; i<=n; i++)
			ans = mul(ans, i);
		return ans;

	}
	static long fastPow(long a, long b){
		long result =1;
		while(b>0){
			if(b%2==1)result = mul(result, a);
			a = mul(a, a);
			b/=2;
		}
		return result;
	}
	static long modInv(long x){
		return fastPow(x, MOD-2);
	}
	
	static long nCr(long n, long r){
		return mul(fact(n), mul(modInv(fact(n-r)), modInv(fact(r))));
	}
} 

