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;
typedef long long ll;
#define int ll
const int maxn = 1e5+5;
const int md = 1e9+7;
ll a[maxn];
ll mul(ll u,ll v)
{
	return (u*v)%md;
}
ll sum(ll u,ll v)
{
	return (u+v)%md;
}
int f[maxn],rf[maxn],re,n,k;
ll pww(ll u,ll v)
{
	ll re=1;
	for(int i=0;i<40;i++)
	{
		if(v&(1LL<<i))re=mul(re,u);
		u=mul(u,u);
	}
	return re;
}
ll mnn(ll u,ll v)
{
	return (u-v+md)%md;
}
int32_t main()
{
	cin>>n>>k;
	f[0]=1;
	for(int i=1;i<=n;i++)
	{
		f[i]=mul(i,f[i-1]);
	}
	rf[n]=pww(f[n],md-2);
	for(int i=n-1;i>=0;i--)
	{
		rf[i]=mul(i+1,rf[i+1]);
	}
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	sort(a,a+n);
	for(int i=0;i<n;i++)if(n-i>=k)
	{
		re=mnn(re,mul((a[i]+md)%md,mul(f[n-i-1],mul(rf[k-1],rf[n-i-k]))));
	}
	for(int i=n-1;i>=0;i--)if(i+1>=k)
	{
		re=sum(re,mul((a[i]+md)%md,mul(f[i],mul(rf[k-1],rf[i-k+1]))));
	}
	cout<<re;
	return 0;
}