#include <bits/stdc++.h>
struct lr {
  int l;
  int r;
  int flag;
};
int main() {
  int N, M, i, j, k;
  int *num;
  struct lr *lr;
  scanf("%d%d", &N, &M);
  lr = (struct lr *)malloc(sizeof(struct lr) * N);
  for (i = 0; i < N; ++i) {
    scanf("%d%d", &(lr[i].l), &(lr[i].r));
    lr[i].flag = 0;
  }
  num = (int *)malloc(sizeof(int) * M + 1);
  for (i = 1; i <= M; ++i) {
    num[i] = 0;
    for (j = i; j <= M; j = j + i) {
      for (k = 0; k < N; ++k) {
        if (j >= lr[k].l && j <= lr[k].r && lr[k].flag == 0) {
          lr[k].flag = 1;
          ++num[i];
        }
      }
    }
    for (k = 0; k < N; ++k) {
      lr[k].flag = 0;
    }
  }
  for (i = 1; i <= M; ++i) {
    printf("%d\n", num[i]);
  }
  free(lr);
  return 0;
}
