#include <bits/stdc++.h>
using namespace std;
int l[300050], r[300050], cnt, s[300050], t[300050], n, m, T;
inline void read(int &x) {
  x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
}
int main() {
  read(n), read(m), T = floor(sqrt(m));
  for (int i = 1; i <= n; i++) read(l[i]), read(r[i]);
  for (int i = 1; i <= T; i++) {
    cnt = 0;
    for (int _ = 1; _ <= n; _++)
      if (floor((l[_] - 1) / i + 1) * i <= r[_]) cnt++;
    printf("%d\n", cnt);
  }
  for (int i = 1; i <= n; i++) {
    for (int _ = max((l[i] - 1) / m, 1); _ <= (l[i] - 1) / (T + 1); _++)
      s[(l[i] - 1) / (_ + 1)]++, s[(r[i] / _) + 1]--;
  }
  for (int i = 1; i <= m; i++) t[i] = t[i - 1] + s[i];
  for (int i = T + 1; i <= m; i++) printf("%d\n", t[i] + 1);
}
