#include <bits/stdc++.h>
int n, m;
int l[3000001];
int r[3000001];
int ans[100000];
int main(int argc, const char *argv[]) {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &l[i], &r[i]);
  }
  int *ansp = &ans[0];
  for (int d = 1; d <= m; d++) {
    *ansp = 0;
    int *rp = &r[0];
    int *lp = &l[0];
    for (int i = 1; i <= n; i++) {
      *ansp += (((int)*rp / d) - ((int)((*lp) - 1) / d) > 0);
      rp++;
      lp++;
    }
    ansp++;
  }
  for (int d = 0; d < m; d++) {
    printf("%d\n", ans[d]);
  }
  return 0;
}
