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