#include <bits/stdc++.h>
using namespace std;
template <typename T>
void get_int(T &x) {
  char t = getchar();
  bool neg = false;
  x = 0;
  for (; (t > '9' || t < '0') && t != '-'; t = getchar())
    ;
  if (t == '-') neg = true, t = getchar();
  for (; t <= '9' && t >= '0'; t = getchar()) x = x * 10 + t - '0';
  if (neg) x = -x;
}
template <typename T>
void print_int(T x) {
  if (x < 0) putchar('-'), x = -x;
  short a[20] = {}, sz = 0;
  while (x > 0) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
const int inf = 0x3f3f3f3f;
const long long Linf = 1ll << 61;
const double pi = acos(-1.0);
int n, m, a[100111];
int main() {
  get_int(n), get_int(m);
  for (int i = 1, l, r; i <= n; i++) {
    get_int(l), get_int(r);
    a[1]++;
    a[r + 1]--;
    if (l == 1) continue;
    l--;
    for (int j = 1, s, t; j * j <= l; j++) {
      if (r / j == l / j) {
        a[j]--;
        a[j + 1]++;
      }
      if (j * j == l) continue;
      s = r / (j + 1) + 1;
      t = l / j;
      if (s <= t) {
        a[s]--;
        a[t + 1]++;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    a[i] += a[i - 1];
    print_int(a[i]), puts("");
  }
  return 0;
}
