#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &res) {
  res = 0;
  T f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    res = res * 10 + c - '0';
    c = getchar();
  }
  res *= f;
}
template <class T>
void out(T x) {
  if (x < 0) {
    x = -x;
    putchar('-');
  }
  if (x >= 10) {
    out(x / 10);
  }
  putchar('0' + x % 10);
}
int N, M;
int ans[100005];
int sum[100005];
void Solve() {
  read(N);
  read(M);
  for (int i = 1; i <= N; ++i) {
    int l, r;
    read(l);
    read(r);
    for (int i = 1; i <= M; ++i) {
      int tl = (l - 1) / i, tr = r / i;
      int t = M;
      if (tl != 0) t = min(t, (l - 1) / tl);
      if (tr != 0) t = min(t, r / tr);
      if (tl != tr) {
        sum[i]++, sum[t + 1]--;
      }
      i = t;
    }
  }
  for (int i = 1; i <= M; ++i) {
    sum[i] += sum[i - 1];
    out(sum[i]);
    putchar('\n');
  }
}
int main() {
  Solve();
  return 0;
}
