val['   '];
int N, M, ne, I, L, R, S;
void solve(int l, int r) {
  for (I = 1, S = 1e9; I <= r; I = ne + 1) {
    if (I <= l)
      ne = (l / (l / I)) > (r / (r / I)) ? (r / (r / I)) : (l / (l / I));
    else
      ne = r;
    if (l / I < S) {
      val[l / I + 1]++, val[(S > r / I ? r / I : S) + 1]--;
      S = l / I;
    }
  }
}
int main() {
  scanf("%d%d", &N, &M);
  for (I = 1; I <= N; I++) {
    scanf("%d%d", &L, &R);
    solve(L - 1, R);
  }
  for (I = 1; I <= M; I++)
    printf("%d\n", val[I] += val[I - 1]);
  return 0;
}