#include <bits/stdc++.h>
using namespace std;
int n, m, l[300005], r[300005], ans[300005];
int main() {
  int i, j, p;
  scanf("%d %d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d %d", &l[i], &r[i]), l[i]--;
    for (j = 1; j <= r[i]; j = p + 1) {
      p = r[i] / (r[i] / j);
      if (j <= l[i]) p = min(p, l[i] / (l[i] / j));
      if (r[i] / j > l[i] / j) ans[p]++, ans[j - 1]--;
    }
  }
  for (i = m; i >= 1; i--) ans[i] += ans[i + 1];
  for (i = 1; i <= m; i++) printf("%d\n", ans[i]);
  return 0;
}
