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.io.*;
import java.util.*;

public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/2;
    public static final int inf = Integer.MAX_VALUE/2;

    static void solve(InputReader in, PrintWriter out){
        int n = in.ni(), k = in.ni();
        int[] a = in.ni(n);
        Arrays.sort(a);
        long max = 0, min = 0;
        int x = 1;
        Combination c = new Combination(n);
        for (int i = 0; i < n; i++) {
            if(i<n-1&&a[i]==a[i+1]){
                x++;
            }else{
                int y = i-x+1, z = n-i-1;
                max += ((c.comb(x+y,k)-c.comb(y,k))*a[i]);
                max %= mod;
                min -= ((c.comb(x+z,k)-c.comb(z,k))*a[i]);
                min += mod*((-min+mod-1)/mod);
                x = 1;
            }
        }
        max += min;
        while(max<0) max += mod;
        out.println(max%mod);
    }
    public static class Combination{
        long[] fact;
        public Combination(int n){
            fact = new long[n+1];
            fact[0] = 1;
            for (int i = 1; i <= n; i++) {
                fact[i] = fact[i-1]*i;
                fact[i] %= mod;
            }
        }
        public long comb(int i, int j){
            if(i>=j) return (((fact[i]*pow(fact[j],mod-2))%mod)*pow(fact[i-j],mod-2))%mod;
            else return 0;
        }
        private long pow(long x, long n){
            long res = 1;
            while(n > 0){
                if ((n & 1) == 1) {
                    res *= x;
                    res %= mod;
                }
                x *= x;
                x %= mod;
                n >>= 1;
            }
            return res;
        }
    }

    public static void main(String[] args){
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public double nd(){
            return Double.parseDouble(ns());
        }
        public char nc(){
            return ns().toCharArray()[0];
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}