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 rep(i,n) for(int i=0; i<(int)(n); i++)

using namespace std;
typedef long long LL;
const LL mod=1000000007;
const int Max_Num=100010;

LL modinv(LL x){
	LL m=mod, u=1, v=0;
	while(m){
		LL t=x/m;
		x-=t*m; swap(x,m);
		u-=t*v; swap(u,v);
	}
	u%=mod;
	if(u<0) u+=mod;
	return u;
}

int main(){
  int N, K;
  cin >> N >> K;
  int A[Max_Num];
  rep(i,N) cin >> A[i];
  sort(A,A+N);
  LL F[Max_Num], Finv[Max_Num];
  F[0]=1;
  rep(i,Max_Num-1){
  	F[i+1]=F[i]*(i+1);
  	F[i+1]%=mod;
  }
  rep(i,Max_Num) Finv[i]=modinv(F[i]);
  LL MaxSum=0, MinSum=0;
  for(int i=K; i<=N; i++) MaxSum+=A[i-1]*F[i-1]%mod*Finv[K-1]%mod*Finv[i-K]%mod;
  for(int i=N-K+1; i>=1; i--) MinSum+=A[i-1]*F[N-i]%mod*Finv[K-1]%mod*Finv[N-K+1-i]%mod;
  LL ans=(MaxSum-MinSum)%mod;
  while(ans<0) ans+=mod;
  cout << ans << endl;

  return 0;
}
