#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T& num) {
  num = 0;
  T f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') num = num * 10 + ch - '0', ch = getchar();
  num *= f;
}
int power(int x, int k, int p) {
  int res = 1;
  for (; k; k >>= 1, x = 1ll * x * x % p)
    if (k & 1) res = 1ll * res * x % p;
  return res;
}
const int maxn = 3e5 + 5;
int n, m;
int ans[maxn];
void add(int l, int r) {
  ans[l]++;
  ans[r + 1]--;
}
void calc() {
  for (int(i) = (1); (i) <= (m); (i)++) ans[i] += ans[i - 1];
}
int main() {
  read(n);
  read(m);
  for (int(i) = (1); (i) <= (n); (i)++) {
    int l, r;
    read(l);
    read(r);
    l--;
    for (int j = 1, nxtj; j <= r; j = nxtj + 1) {
      if (l / j) {
        nxtj = min(l / (l / j), r / (r / j));
      } else {
        nxtj = r / (r / j);
      }
      if ((l / j) != (r / j)) add(j, nxtj);
    }
  }
  calc();
  for (int(i) = (1); (i) <= (m); (i)++) printf("%d\n", ans[i]);
  return 0;
}
