#include <bits/stdc++.h>
typedef struct {
  int l, r;
} miyage_t;
int N, M;
miyage_t miyage[1000000];
int kaeru[10000000];
int main(void) {
  int i;
  if (scanf("%d%d", &N, &M) != 2) return 1;
  for (i = 0; i < N; i++) {
    if (scanf("%d%d", &miyage[i].l, &miyage[i].r) != 2) return 1;
  }
  for (i = 0; i < N; i++) {
    int d = 1;
    if (0) printf("debug meisan = [%d, %d]\n", miyage[i].l, miyage[i].r);
    while (d <= M) {
      int left = d, right = M, mid, nextd = d;
      if ((miyage[i].l - 1) / d < miyage[i].r / d) {
        while (left <= right) {
          mid = (left + right) / 2;
          if (miyage[i].r / mid < miyage[i].r / d) {
            right = mid - 1;
          } else {
            left = mid + 1;
            if (nextd < mid) nextd = mid;
          }
        }
        kaeru[d]++;
        kaeru[nextd + 1]--;
        if (0) printf("can buy [%d, %d]\n", d, nextd);
      } else {
        while (left <= right) {
          mid = (left + right) / 2;
          if ((miyage[i].l - 1) / mid < (miyage[i].l - 1) / d) {
            right = mid - 1;
          } else {
            left = mid + 1;
            if (nextd < mid) nextd = mid;
          }
        }
        if (0) printf("cannot buy [%d, %d]\n", d, nextd);
      }
      d = nextd + 1;
    }
  }
  for (i = 1; i <= M; i++) {
    kaeru[i] += kaeru[i - 1];
    printf("%d\n", kaeru[i]);
  }
  return 0;
}
