#include <bits/stdc++.h>
int specialty[300000][2];
int main(void) {
  int N, M, l, r, i, j, ans;
  scanf("%d%d", &N, &M);
  for (i = 0; i < N; i++) {
    scanf("%d%d", &l, &r);
    specialty[i][0] = l;
    specialty[i][1] = r;
  }
  printf("%d\n", N);
  for (i = 2; i <= M; i++) {
    ans = 0;
    for (j = 0; j < N; j++) {
      l = specialty[j][0];
      r = specialty[j][1];
      if (l % i == 0 || l + i - l % i <= r) {
        ans++;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
