#include <bits/stdc++.h>
int n, m, l, r, a[300010];
int main() {
  scanf("%d%d", &n, &m);
  memset(a, 0, sizeof(a));
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &l, &r);
    int t = (r - l + 100);
    for (int j = 1; j <= sqrt(t) && j <= m; j++) {
      if (r / j - (l - 1) / j > 0) a[j]++;
      if (r / (t / j) - (l - 1) / (t / j) > 0) a[t / j]++;
    }
  }
  for (int i = 1; i <= m; i++) printf("%d\n", a[i]);
  return 0;
}
