#include <bits/stdc++.h>
struct BIT {
  int *array, *sums;
  int size;
};
struct part {
  int l, r, len;
};
void make_BIT(struct BIT *tree, int a[], int n);
void update_BIT(struct BIT *tree, int num, int index);
int sum_BIT(struct BIT *tree, int from, int to);
void free_BIT(struct BIT *tree);
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;
  struct BIT *myBIT;
  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);
  make_BIT(myBIT, inum, M + 1);
  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++) {
        update_BIT(myBIT, ++inum[k], 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;
}
void make_BIT(struct BIT *tree, int a[], int n) {
  int i, j, k, minbit;
  tree->size = n;
  tree->array = (int *)calloc(n, sizeof(int));
  tree->sums = (int *)calloc(n, sizeof(int));
  for (i = 0; i < n; i++) update_BIT(tree, a[i], i);
}
void update_BIT(struct BIT *tree, int num, int index) {
  int i, j, next;
  for (i = index; i < tree->size; i = next) {
    tree->sums[i] -= tree->array[index];
    tree->sums[i] += num;
    next = i + 1;
    for (j = 0; j < 32; j++) {
      if (((next >> j) & 1) == 0) continue;
      next += (1 << j);
      break;
    }
    next--;
  }
  tree->array[index] = num;
}
int sum_BIT(struct BIT *tree, int from, int to) {
  int Sfrom = 0, Sto = 0;
  int i, minbit, w;
  if (from > to) {
    from ^= to;
    to ^= from;
    from ^= to;
  }
  from--;
  for (i = from; i >= 0; i -= w) {
    Sfrom += tree->sums[i];
    for (minbit = 0; minbit < 32; minbit++)
      if ((i + 1) >> minbit & 1) break;
    w = 1 << minbit;
  }
  for (i = to; i >= 0; i -= w) {
    Sto += tree->sums[i];
    for (minbit = 0; minbit < 32; minbit++)
      if ((i + 1) >> minbit & 1) break;
    w = 1 << minbit;
  }
  return Sto - Sfrom;
}
void free_BIT(struct BIT *tree) {
  free(tree->array);
  free(tree->sums);
}
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;
}
