#include <bits/stdc++.h>
using namespace std;
int const N = 2e5 + 20, MAX = 4e5 + 20, INF = 1e9 + 5, mod = 1e9 + 7;
int n, m, k, st[N], en[N], sum[MAX], fac[N], rev[N], c[N], ans;
vector<int> p;
map<int, int> mp;
int bpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1LL * res * a % mod;
    a = 1LL * a * a % mod;
    b >>= 1;
  }
  return res;
}
void pre() {
  fac[0] = rev[0] = 1;
  for (int i = 1; i < N; i++)
    fac[i] = 1LL * fac[i - 1] * i % mod, rev[i] = bpow(fac[i], mod - 2);
  for (int i = k; i < N; i++) {
    c[i] = 1LL * fac[i] * rev[k] % mod * rev[i - k] % mod;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> st[i] >> en[i];
    en[i]++;
    p.push_back(st[i]);
    p.push_back(en[i]);
  }
  p.push_back(-INF);
  p.push_back(+INF);
  pre();
  sort(p.begin(), p.end());
  p.resize(unique(p.begin(), p.end()) - p.begin());
  m = p.size();
  for (int i = 0; i < m; i++) mp[p[i]] = i;
  for (int i = 0; i < n; i++) {
    st[i] = mp[st[i]];
    en[i] = mp[en[i]];
    sum[st[i]]++;
    sum[en[i]]--;
  }
  for (int i = 1; i < m; i++) {
    sum[i] += sum[i - 1];
    if (sum[i] >= k) {
      ans = (ans + 1LL * c[sum[i]] * (p[i + 1] - p[i]) % mod) % mod;
    }
  }
  cout << ans << '\n';
}
