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<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<stack>
#include<vector>
#include<map>
#define int long long
using namespace std;
const int maxn = 1e5+10;
const int mod = 1e9+7;

int read(){
	int x=0,f=1;
	char c=getchar();
	while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
	while(isdigit(c)){x=(x<<3)+(x<<1)+c-48;c=getchar();}
	return x*f;
}

int ksm(int x,int y){
	int sum=1;
	while(x){
		if(x&1)sum=sum*y%mod;
		y=y*y%mod;
		x>>=1;
	}
	return sum;
}

int k,m,n;
int a[maxn];
int C[maxn];
signed main(){
	n=read();k=read();
	for(register int i=1;i<=n;i++)a[i]=read();
	C[k-1]=1;
	for(register int i=k;i<=n;i++){
		C[i]=C[i-1]*i%mod*(ksm(mod-2,i-k+1))%mod;	
	}
	sort(a+1,a+n+1);
	int sum=0,ans=0;
	for(register int i=n;i>=k;i--){
		(ans=ans+C[i-1]*a[i]%mod)%=mod;
	}
	for(register int i=1;i+k-1<=n;i++){
		(ans=ans-C[n-i]*a[i]%mod+mod)%=mod;
	}
	printf("%lld\n",ans);
	return 0;
}