#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;
    while (miyage[i].r >= d) {
      int a, nextd;
      if ((miyage[i].l - 1) / d < miyage[i].r / d) {
        a = miyage[i].r / d;
        nextd = (miyage[i].r + a) / a - 1;
        kaeru[d]++;
        kaeru[nextd + 1]--;
      } else {
        a = (miyage[i].l - 1) / d;
        nextd = ((miyage[i].l - 1) + a) / a - 1;
      }
      if (nextd < d) {
        puts("unko!");
        return 1;
      }
      d = nextd + 1;
    }
  }
  for (i = 1; i <= M; i++) {
    kaeru[i] += kaeru[i - 1];
    printf("%d\n", kaeru[i]);
  }
  return 0;
}
