For a finite set of integers X, let f(X)=\max X - \min X.

Given are N integers A_1,...,A_N.

We will choose K of them and let S be the set of the integers chosen. If we distinguish elements with different indices even when their values are the same, there are {}_N C_K ways to make this choice. Find the sum of f(S) over all those ways.

Since the answer can be enormous, print it \bmod (10^9+7).

Constraints

* 1 \leq N \leq 10^5
* 1 \leq K \leq N
* |A_i| \leq 10^9

Input

Input is given from Standard Input in the following format:


N K
A_1 ... A_N


Output

Print the answer \bmod (10^9+7).

Examples

Input

4 2
1 1 3 4


Output

11


Input

6 3
10 10 10 -10 -10 -10


Output

360


Input

3 1
1 1 1


Output

0


Input

10 6
1000000000 1000000000 1000000000 1000000000 1000000000 0 0 0 0 0


Output

999998537
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		long MOD = 1000000007;
		int n = sc.nextInt();
		int k = sc.nextInt();
		int[] a = new int[n];
		for(int i = 0; i < n; i++){
		    a[i] = sc.nextInt();
		}
		Arrays.sort(a);
		
		// 計算
		long result = 0;
		long[] fact = fact(n, MOD);
		long[] invFact = invFact(fact, MOD);
		long maxSum = 0;
		long minSum = 0;
		for(int i = 0; i < n; i++){
		    long now = a[i];
		    maxSum += now*combination(i, k-1, fact, invFact, MOD)%MOD;
		    minSum += now*combination(n-(i+1), k-1, fact, invFact, MOD)%MOD;
		}
		result = maxSum + MOD - minSum;
		result %= MOD;
		
		// 出力
		System.out.println(result);
	}
	public static long pow(long a, long n, long MOD) {
	    long res=1;
	    while (n>0) {
	        if ((n-n/2*2)==1) {
	            res=(res*a)%MOD;
	        }
	        a=(a*a)%MOD;
	        n>>=1;
	    }
	    return res%MOD;
	}
	
	public static long[] fact(int n, long MOD) {
	    long[] f = new long[n+1];
	    for(int i = 0; i < n+1; i++){
	        if(i == 0) f[i] = 1;
	        if(i > 0) f[i] = (f[i-1]*i)%MOD;
	    }
	    return f;
	}
	
	public static long[] invFact(long[] fact, long MOD) {
	    int len = fact.length;
	    long[] f = new long[len];
	    for(int i = 0; i < len; i++){
	        f[i] = pow(fact[i], MOD - 2, MOD);
	    }
	    return f;
	}
	
	public static long combination(int n, int k, long[] fact, long[] invFact, long MOD) {
		if(n < 0 || k < 0) return 0;
	    if(n < k) return 0;
	    long a = fact[n];
	    long b = invFact[k];
	    long c = invFact[n-k];;
	    return (((a*b)%MOD)*c)%MOD;
	}	
}
