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

import java.util.*;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int k = sc.nextInt();
        long[] list = new long[n];

        for (int i = 0; i < n; i++) {
            list[i] = sc.nextLong();
        }

        Arrays.sort(list);

        long[] comb = new long[n];
        long[] rf = new long[n];
        long[] f = new long[n];
        f[0] = 1;

        final int mod = 1000000007;

        for (int i = 1; i < n; i++) {
            f[i] = (f[i - 1] * i) % mod;
        }
        rf[n - 1] = pow(f[n - 1], mod - 2, mod);
        for (int i = n - 2; i >= 0 ; i--) {
            rf[i] = (rf[i + 1] * (i + 1)) % mod;
        }

        for (int i = k - 1; i < comb.length ; i++) {
            long a = f[i]; // n!
            long b = rf[i - (k - 1)]; // (n-k)!
            long c = rf[k - 1]; // k!
            long bc = (b * c) % mod;

            comb[i] = (a * bc % mod);
        }

        long ans = 0;

        for (int i = 0; i < n; i++) {
            long min = comb[n - i - 1];
            long max = comb[i];
            long gap = max - min;
            ans += list[i] * gap % mod;
            ans %= mod;
        }

        System.out.println(ans);
    }

    //return a^b mod M O(logB)
    private static long pow(long a,long b,int M) {
        long ret = 1;
        long tmp = a;
        while(b>0) {
            if((b&1)==1) ret = (ret * tmp) % M;
            tmp = (tmp * tmp) % M;
            b = b>>1;
        }
        return ret;
    }
}