#include <bits/stdc++.h>
using namespace std;
int N, M;
int L, R;
signed long long sum[101010];
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> N >> M;
  for (i = 0; i < (N); i++) {
    cin >> L >> R;
    if (R - L <= 1000) {
      for (j = 1; j <= R; j++) {
        if (R / j != (L - 1) / j) sum[j]++, sum[j + 1]--;
      }
    } else {
      sum[1]++;
      sum[R - L + 2]--;
      int preL = 101010, preR = 101010;
      for (x = 1; x <= 400; x++) {
        if (x * (R - L + 1) > R) break;
        int TL = (L + (x - 1)) / x;
        int TR = R / x;
        TL = max(TL, R - L + 2);
        TR = min(TR, preL - 1);
        if (TL > TR) break;
        sum[TL]++;
        sum[TR + 1]--;
        preL = TL;
        preR = TR;
      }
    }
  }
  signed long long tot = 0;
  for (i = 1; i <= M; i++) {
    tot += sum[i];
    cout << tot << endl;
  }
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
