#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const int inf = (1 << 30) - 1;
const ll INF = (1LL << 60) - 1;
const ld EPS = 1e-10;
template <typename T>
bool chmax(T &x, const T &y) {
  return (x < y) ? (x = y, true) : false;
};
template <typename T>
bool chmin(T &x, const T &y) {
  return (x > y) ? (x = y, true) : false;
};
int main() {
  int N, M;
  cin >> N >> M;
  int l[N], r[N];
  for (int i = 0; i < N; i++) cin >> l[i] >> r[i];
  int ans[M + 1], query[M + 2];
  fill(ans, ans + M + 1, 0);
  fill(query, query + M + 2, 0);
  for (int i = 0; i < N; i++) {
    int j = 1;
    while (true) {
      int L = (l[i] + j - 1) / j, R = r[i] / j;
      if (j > L) break;
      if (L <= R) {
        query[L]++, query[R + 1]--;
        if (j != L) ans[j]++;
      }
      j++;
    }
  }
  int sum = 0;
  for (int i = 1; i <= M; i++) {
    sum += query[i];
    cout << ans[i] + sum << endl;
  }
}
