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;
int64_t c(vector<int64_t> &f,vector<int64_t> &fi,int p,int a,int b){
  if(b<0||b>a)
    return 0;
  return f.at(a)*fi.at(b)%p*fi.at(a-b)%p;
}
int main(){
  int n,k;
  cin>>n>>k;
  int p=1000000007;
  vector<int64_t> f(n+1,1);
  for(int i=1;i<=n;i++)
    f.at(i)=f.at(i-1)*i%p;
  vector<int64_t> fi(n+1,1);
  int q=p-2;
  vector<bool> b;
  while(q>0){
    b.push_back(q%2==1);
    q/=2;
  }
  for(int d=(int)b.size()-1;d>=0;d--){
    fi.at(n)=fi.at(n)*fi.at(n)%p;
    if(b.at(d))
      fi.at(n)=fi.at(n)*f.at(n)%p;
  }
  for(int i=n;i>=1;i--)
    fi.at(i-1)=fi.at(i)*i%p;
  vector<int64_t> a(n);
  for(int i=0;i<n;i++)
    cin>>a.at(i);
  sort(a.begin(),a.end());
  for(int i=n-1;i>=0;i--)
    a.at(i)-=a.at(0);
  int64_t s=0;
  for(int i=0;i<n;i++)
    s=(s+(c(f,fi,p,i,k-1)-c(f,fi,p,n-1-i,k-1)+p)*a.at(i))%p;
  cout<<s<<endl;
}