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;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
#define rep(i,n) for(ll i = 0;i < (ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define MOD 1000000007

vector<ll> fact(100100,1),refact(100100,1);

ll mypow(ll n,ll r){
  ll res = 1;
  while(r){
    if(r & 1)res = res*n%MOD;
    n = n*n%MOD;
    r >>= 1;
  }
  return res;
}
ll comb(ll n,ll r){return n >= r ? (((fact[n]*refact[r])%MOD)*refact[n-r])%MOD : 0;}

int main(){

  rep(i,100000)fact[i+1] = fact[i]*(i+1)%MOD;
  refact[100000] = mypow(fact[100000],MOD-2);
  for(int i = 99999;i > 0;i--)refact[i] = refact[i+1]*(i+1)%MOD;

  int n,k;
  cin >> n >> k;
  vector<ll> a(n);
  rep(i,n)cin >> a[i];
  sort(ALL(a));
  ll res = 0;
  rep(i,n)(res += comb(i,k-1)*a[i]%MOD)%MOD;
  for(int i = n-1;i >= 0;i--)res = (res+MOD-(comb(n-i-1,k-1)*a[i]%MOD))%MOD;
  cout << res << endl;




  return 0;
}
