#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, d[400010], m;
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= n; i++) {
    int l = read(), r = read();
    for (int j = 1; j <= r; j++) {
      int jj = (r / (r / j));
      int lb = l / (r / j) + bool(l % (r / j));
      if (lb > jj) continue;
      d[jj + 1]--;
      d[max(lb, j)]++;
      j = jj;
    }
  }
  for (int i = 1; i <= m; i++) d[i] += d[i - 1];
  for (int i = 1; i <= m; i++) printf("%d\n", d[i]);
  return 0;
}
