#include <bits/stdc++.h>
struct part {
  int l, r, len;
};
int partcomp(const void *p1, const void *p2);
int main(void) {
  struct part *item;
  int N, M;
  int i, j, k, sm;
  int longer, now;
  int *inum;
  scanf("%d%d", &N, &M);
  item = (struct part *)calloc(N, sizeof(struct part));
  inum = (int *)calloc(M + 1, sizeof(int));
  for (i = 0; i < N; i++) {
    scanf("%d%d", &(item[i].l), &(item[i].r));
    item[i].len = item[i].r - item[i].l + 1;
  }
  qsort(item, N, sizeof(item[0]), partcomp);
  now = 0;
  for (i = 1; i <= M; i++) {
    for (j = now; j < N && item[j].len <= i; j++) {
      for (k = item[j].l; k <= item[j].r; k++) {
        inum[k]++;
      }
      now = j + 1;
    }
    longer = N - now;
    sm = 0;
    for (j = i; j <= M; j += i) sm += inum[j];
    printf("%d\n", longer + sm);
  }
  return 0;
}
int partcomp(const void *p1, const void *p2) {
  struct part st1 = *(struct part *)p1;
  struct part st2 = *(struct part *)p2;
  return st1.len - st2.len;
}
