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>
using namespace std;
const long long v=100010,p=1e9+7;
long long s[v],t,z,n,m,h[v],jc[v],inv[v];
long long read()
{
	long long f=1,x=0;
	char c=getchar();
	for(;!isdigit(c);c=getchar())
	if(c=='-')f=-1;
	for(;isdigit(c);c=getchar())x=(x<<3)+(x<<1)+(c&15);
	return x*f;
}
long long ksm(long long x,long long q)
{
	long long w=1;
	for(;q;x=(x*x)%p,q/=2)
	if(q&1)w=(w*x)%p;
	return w;
}
long long C(long long x,long long y)
{
	long long q;
	q=jc[y]*ksm(jc[x],p-2)%p;
	q=q*ksm(jc[y-x],p-2)%p;
	//printf("%lld %lld %lld %lld %lld\n",x,y,jc(y),ksm(jc(x),p-2),ksm(jc(y-x),p-2));
	return q;
}
int main()
{
	long long i;
	n=read();m=read();jc[0]=1;
	for(i=1;i<=n;i++)s[i]=read();
	for(i=1;i<=n;i++)jc[i]=jc[i-1]*i%p;
	//阶乘可预处理，防止超时 
	sort(s+1,s+n+1);
	for(i=1;i<=n-m+1;i++)t=(t+(s[i]*C(m-1,n-i))%p)%p;
	for(i=m;i<=n;i++)z=(z+(s[i]*C(m-1,i-1))%p)%p;
	cout<<((z-t)%p+p)%p;
	return 0;
}
