#include <bits/stdc++.h>
using namespace std;
const int maxn = 100009;
int f[maxn], last;
int n, m, a, b, d;
inline int read() {
  char ch = getchar();
  int x = 0;
  while (ch < '0' || '9' < ch) ch = getchar();
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
inline void change(int a, int b) {
  if (a > b) return;
  f[a]++;
  f[b + 1]--;
}
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= n; i++) {
    a = read();
    b = read();
    d = b - a + 1;
    last = b + 1;
    for (int k = 1; k <= d; k++) {
      change((a + k - 1) / k, min(last - 1, b / k));
      last = (a + k - 1) / k;
      if (last - 1 <= d) break;
    }
    if (d + 1 <= last - 1) {
      for (int k = a; k <= b; k++) change(i / (last - 1), (i + d) / (d + 1));
    }
    change(1, min(d, last - 1));
  }
  for (int i = 1; i <= m; i++) {
    f[i] += f[i - 1];
    printf("%d\n", f[i]);
  }
  return 0;
}
