#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using ull = unsigned long long;
using ld = long double;
template <typename T>
void _(const char* s, T h) {
  cerr << s << " = " << h << "\n";
}
template <typename T, typename... Ts>
void _(const char* s, T h, Ts... t) {
  int b = 0;
  while (((b += *s == '(') -= *s == ')') != 0 || *s != ',') cerr << *s++;
  cerr << " = " << h << ",";
  _(s + 1, t...);
}
struct init {
  init() {
    cin.tie(0);
    iostream::sync_with_stdio(0);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(5);
  }
  ~init() {}
} init;
template <typename T, typename U>
void upx(T& x, U y) {
  if (x < y) x = y;
}
template <typename T, typename U>
void upn(T& x, U y) {
  if (x > y) x = y;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int D = 4, dx[] = {+1, 0, -1, 0}, dy[] = {0, +1, 0, -1};
const int N = 3e5 + 5, K = 1000;
int p[N], l[N], r[N], a[N];
int32_t main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < (n); ++i) {
    cin >> l[i] >> r[i];
    int pl = N;
    for (int k = 1; k <= N; ++k) {
      int cl = (l[i] + k - 1) / k, cr = r[i] / k;
      if (cr + 1 >= pl) {
        p[K]++;
        p[pl]--;
        break;
      }
      if (cl < K) {
        if (cr >= K) {
          p[K]++;
          p[cr + 1]--;
        }
        break;
      }
      p[cl]++;
      p[cr + 1]--;
      pl = cl;
    }
    for (int j = 2; j < K; ++j) {
      int x = (l[i] + j - 1) / j;
      if (x * j <= r[i]) a[j]++;
    }
  }
  int ans = p[0] + p[1];
  cout << n << '\n';
  for (int i = 2; i <= m; ++i) {
    ans += p[i];
    cout << ans + a[i] << '\n';
  }
  return 0;
}
