#include <bits/stdc++.h>
using namespace std;
vector<long long> dp(250000), f(250000), inv(250000);
const long long mod = 1e9 + 7;
long long pow2(long long a, long long k) {
  if (a >= mod) a %= mod;
  if (k == 0) return 1;
  if (k == 1) return a;
  long long tmp = pow2(a, k / 2);
  tmp = tmp * tmp;
  if (tmp >= mod) tmp %= mod;
  if (k & 1) tmp = tmp * a;
  if (tmp >= mod) tmp %= mod;
  return tmp;
}
void fact() {
  f[0] = 1;
  for (long long i = 1; i < 250000; ++i) {
    f[i] = i * f[i - 1];
    if (f[i] >= mod) f[i] %= mod;
    inv[i] = pow2(f[i], mod - 2);
  }
}
long long nad(long long n, long long k) {
  long long inv1 = inv[k], inv2 = inv[n - k];
  if (n == k) return 1;
  long long x = f[n];
  x *= inv1;
  if (x >= mod) x %= mod;
  x *= inv2;
  if (x >= mod) x %= mod;
  return x;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cerr.tie(nullptr);
  fact();
  long long n, k;
  cin >> n >> k;
  vector<pair<long long, long long> > a;
  for (long long i = 0; i < n; ++i) {
    long long l, r;
    cin >> l >> r;
    a.push_back({l, -1});
    a.push_back({r, 1});
  }
  sort(a.begin(), a.end());
  long long cur = 0, l, r;
  for (long long i = 0; i < 2 * n - 1; ++i) {
    cur -= a[i].second;
    if (cur < k) continue;
    if (a[i].second == -1 && a[i + 1].second == -1) {
      dp[cur] += a[i + 1].first - a[i].first;
    }
    if (a[i].second == -1 && a[i + 1].second == 1) {
      dp[cur] += a[i + 1].first - a[i].first + 1;
    }
    if (a[i].second == 1 && a[i + 1].second == -1) {
      dp[cur] += a[i + 1].first - a[i].first - 1;
    }
    if (a[i].second == 1 && a[i + 1].second == 1) {
      dp[cur] += a[i + 1].first - a[i].first;
    }
  }
  long long sol = 0;
  for (long long i = k; i <= n; ++i) {
    long long x = dp[i] * nad(i, k);
    if (x >= mod) x %= mod;
    sol += x;
    if (sol >= mod)
      ;
    sol %= mod;
  }
  cout << sol << '\n';
}
