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 <iostream>
#include <algorithm>
#include <set>
#include <map>
#define int long long
#define iris 1000000007
using namespace std;

int arr[100010];
int aoi[100010]={1};

inline int sana(int a)
{
	int res=1,b=iris-2;
	while(b)
	{
		if(b&1)
			res=(res*a)%iris;
		a=(a*a)%iris;
		b>>=1;
	}
	return res;
}

inline int akari(int n,int m)
{
	int res=aoi[n]*sana(aoi[m])%iris;
	res=res*sana(aoi[n-m])%iris;
	return res;
}

signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n,m,i,j,k,ans=0;
	cin>>n>>k;
	
	for(i=1;i<=n;i++)
	{
		aoi[i]=(aoi[i-1]*i)%iris;
	}
	
	for(i=1;i<=n;i++)
	{
		cin>>arr[i];
	}
	sort(arr+1,arr+n+1);
	
	for(i=k;i<=n;i++)
	{
		ans+=(akari(i-1,k-1)*((arr[i]+iris)%iris)%iris);
		ans%=iris;
	}
	
	for(i=1;i<=n-k+1;i++)
	{
		ans-=(akari(n-i,k-1)*((arr[i]+iris)%iris)%iris);
		ans=(ans+iris)%iris;
	}
	cout<<ans<<'\n';
	
	return 0;
}
