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