#include <bits/stdc++.h>
using namespace std;
long long n, m, i;
long long find_(long long l, long long r, long min1, long long max1) {
  long long temp1;
  temp1 = (max1 + min1) / 2;
  if ((((r / temp1) - ((l - 1) / temp1)) > 0) &&
      ((((r / (temp1 + 1)) - ((l - 1) / (temp1 + 1))) == 0) ||
       ((temp1 + 1) == l))) {
    return temp1;
  } else if ((((r / temp1) - ((l - 1) / temp1)) > 0) &&
             (((r / (temp1 + 1)) - ((l - 1) / (temp1 + 1))) > 0))
    temp1 = find_(l, r, temp1 + 1, max1);
  else
    temp1 = find_(l, r, min1, temp1 - 1);
  return temp1;
}
int main() {
  cin >> n >> m;
  vector<long long> d(m + 1);
  fill(d.begin(), d.end(), 0);
  long long temp1, temp2;
  for (i = 1; i <= n; i++) {
    cin >> temp1 >> temp2;
    long long temp3;
    if (temp1 > 1) {
      temp3 = find_(temp1, temp2, 1, temp1 - 1);
      if (temp3 == (temp1 - 1)) {
        d[1]++;
        if ((temp2 + 1) <= m) d[temp2 + 1] = -1;
      } else {
        d[1]++;
        d[temp3 + 1]--;
        d[temp1]++;
        if ((temp2 + 1) <= m) d[temp2 + 1] -= 1;
      }
    } else {
      d[temp1]++;
      if ((temp2 + 1) <= m) d[temp2 + 1] -= 1;
    }
  }
  cout << d[1] << endl;
  for (i = 2; i <= m; i++) {
    d[i] += d[i - 1];
    cout << d[i] << endl;
  }
  return 0;
}
