#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1e13;
const int MAX_K = 200007;
long long factmod[MAX_K + 1];
struct intervaltree {
  int n;
  vector<long long> val, start, finish;
  void init(int input) {
    n = input;
    val.assign(4 * n, 0);
    start.assign(4 * n, 0);
    finish.assign(4 * n, 0);
    start[1] = 1;
    finish[1] = n;
    initnode(1);
  }
  void initnode(int root) {
    if (start[root] == finish[root]) return;
    if (start[root] + 1 == finish[root]) {
      start[2 * root] = finish[2 * root] = start[root];
      start[2 * root + 1] = finish[2 * root + 1] = start[root] + 1;
      return;
    }
    start[2 * root] = start[root];
    finish[2 * root] = start[root] + (finish[root] - start[root]) / 2;
    start[2 * root + 1] = finish[2 * root] + 1;
    finish[2 * root + 1] = finish[root];
    initnode(2 * root);
    initnode(2 * root + 1);
  }
  void update(int from, int to, int root) {
    if (start[root] >= from && finish[root] <= to) {
      ++val[root];
      return;
    }
    if (start[root] > to || finish[root] < from) return;
    update(from, to, 2 * root);
    update(from, to, 2 * root + 1);
  }
  long long get(int idx, int root) {
    if (start[root] == finish[root]) return val[root];
    if (finish[2 * root] >= idx) {
      return val[root] + get(idx, 2 * root);
    }
    return val[root] + get(idx, 2 * root + 1);
  }
};
long long powmod(long long a, long long p) {
  long long res = 1;
  int i = 0;
  while (p > 0) {
    if (p & (1 << i)) {
      p -= (1 << i);
      res = (res * a) % MOD;
    }
    a = (a * a % MOD);
    ++i;
  }
  return res;
}
long long divmod(long long a, long long b) {
  return (a * powmod(b, MOD - 2)) % MOD;
}
void init() {
  factmod[0] = 1;
  for (int i = 1; i <= MAX_K; ++i) {
    factmod[i] = (factmod[i - 1] * i) % MOD;
  }
}
int test() {
  intervaltree it;
  it.init(10);
  for (int i = 1; i <= 10; ++i) cout << it.get(i, 1);
  cout << endl;
  it.update(3, 6, 1);
  for (int i = 1; i <= 10; ++i) cout << it.get(i, 1);
  cout << endl;
  it.update(1, 9, 1);
  for (int i = 1; i <= 10; ++i) cout << it.get(i, 1);
  cout << endl;
  it.update(7, 9, 1);
  for (int i = 1; i <= 10; ++i) cout << it.get(i, 1);
  cout << endl;
}
int main() {
  init();
  intervaltree it;
  int n, k;
  cin >> n >> k;
  vector<long long> combk(n + 1, 0);
  for (int i = k; i <= n; ++i) {
    combk[i] = factmod[i];
    combk[i] = divmod(combk[i], factmod[i - k]);
    combk[i] = divmod(combk[i], factmod[k]);
  }
  map<long long, int> m;
  vector<long long> start(n + 1), finish(n + 1);
  for (int i = 1; i <= n; ++i) {
    cin >> start[i] >> finish[i];
    m[start[i]] = 0;
    m[finish[i]] = 0;
  }
  int itidx = 1;
  long long lastpos = -INF;
  vector<long long> sz(1);
  for (auto a : m) {
    long long curpos = a.first;
    if (lastpos > -INF) {
      sz.push_back((curpos - lastpos - 1) % MOD);
      ++itidx;
    }
    m[curpos] = itidx;
    sz.push_back(1);
    ++itidx;
    lastpos = curpos;
  }
  --itidx;
  it.init(itidx);
  for (int i = 1; i <= n; ++i) {
    int l = start[i], r = finish[i];
    int li = m[l], ri = m[r];
    it.update(li, ri, 1);
  }
  long long res = 0;
  for (int i = 1; i <= itidx; ++i) {
    int cnt = it.get(i, 1);
    long long mul = combk[cnt];
    res = (res + (mul * sz[i] % MOD)) % MOD;
  }
  cout << res << endl;
}
