#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
const int maxm = 300000 + 5;
int n, m, delta[maxm];
int xs[maxn], nx;
int main(void) {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    int l, r;
    scanf("%d%d", &l, &r);
    nx = 0;
    xs[nx++] = 0;
    xs[nx++] = l - 1;
    for (int x = 1, y; x <= l - 1; x = y + 1) {
      xs[nx++] = x;
      y = (l - 1) / ((l - 1) / x);
    }
    sort(xs, xs + nx);
    nx = unique(xs, xs + nx) - xs;
    for (int j = 0; j < nx; ++j) {
      int L, R, x = xs[j];
      L = (l - 1) / (x + 1) + 1;
      R = r / (x + 1);
      if (x) R = min(R, (l - 1) / x);
      ++delta[L], --delta[R + 1];
    }
  }
  for (int i = 1; i <= m; ++i) {
    delta[i] += delta[i - 1];
    printf("%d\n", delta[i]);
  }
}
