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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main
{
  public static void main(String[] args) throws IOException
  {
    BufferedReader r = new BufferedReader(new InputStreamReader(System.in), 1);
    String s;
    String sl[];

    s = r.readLine();
    sl = s.split(" ");
    int n = Integer.parseInt(sl[0]);
    int k = Integer.parseInt(sl[1]);

    long a[] = new long[n];

    s = r.readLine();
    sl = s.split(" ");
    for(int i = 0; i < n; i++)
    {
      a[i] = Long.parseLong(sl[i]);
    }

    Arrays.sort(a);

    RemRing rr = new RemRing(1000000007L);

    long fact[] = new long[100001];
    fact[0] = 1;
    fact[1] = 1;

    for(int i = 2; i <= 100000; i++)
    {
      fact[i] = rr.prod(fact[i - 1], i);
    }

    long res = 0;

    for(int i = 0; i <= n - k; i++)
    {
      long c = rr.div(fact[n - i - 1], fact[k - 1]);
      c = rr.div(c, fact[(n - i - 1) - (k - 1)]);
      long v = a[n - 1 - i];
      v = rr.sub(v, a[i]);
      v = rr.prod(c, v);
      res = rr.sum(res, v);
    }

    System.out.println(res);
  }

}

class RemRing
{
  long module;

  public RemRing(long module)
  {
    this.module = module;
  }

  public long sum(long a, long b)
  {
    return (a + b + module) % module;
  }

  public long sub(long a, long b)
  {
    return (a - b + module) % module;
  }

  public long prod(long a, long b)
  {
    return (a * b) % module;
  }

  public long div(long a, long b)
  {
    return (a * inv(b)) % module;
  }

  public long inv(long a)
  {
    long b = this.module;
    long u = 1;
    long v = 0;
    while (b > 0)
    {
      long t = a / b;
      a -= t * b;
      u -= t * v;
      long z = a;
      a = b;
      b = z;
      z = u;
      u = v;
      v = z;
    }
    u %= this.module;
    if (u < 0)
      u += this.module;
    return u;
  }
}