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
#include<bits/stdc++.h>
#define int long long
using namespace std;
const long long mod=1e9+7;
int n,k;
long long a[100003],jie[100003],ans,mi,ma;
long long poww(int x,int p)
{
	if(p==0)
		return 1;
	int tmp=poww(x,p/2);
	tmp=(tmp*tmp)%mod;
	if(p%2==1)
		tmp=(tmp*x)%mod;
	return tmp;
}
long long cc(int nn,int mm)
{
	return jie[nn]*poww(jie[nn-mm],mod-2)%mod*poww(jie[mm],mod-2)%mod;
}
signed main()
{
	scanf("%lld%lld",&n,&k);
	if(k==1)
	{
		cout<<0;
		return 0;
	}
	for(int i=1;i<=n;i++)
		scanf("%lld",&a[i]);
	sort(a+1,a+n+1);
	jie[0]=1,jie[1]=1,k--;
	for(int i=2;i<=100000;i++)
		jie[i]=(jie[i-1]*i)%mod;
	for(int i=1;i<=n;i++)
	{
		if(i-1>=k)
			ma+=cc(i-1,k)%mod*a[i]%mod,ma%=mod;
		if(n-i>=k)
			mi+=cc(n-i,k)%mod*a[i]%mod,mi%=mod;
	}
	cout<<(ma-mi+mod)%mod;
	return 0;
}
