#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
template <class T>
using V = vector<T>;
template <class T>
using VV = vector<vector<T>>;
template <class T, class U>
void chmax(T& x, U y) {
  if (x < y) x = y;
}
template <class T, class U>
void chmin(T& x, U y) {
  if (y < x) x = y;
}
template <class T>
void mkuni(V<T>& v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
}
template <class S, class T>
ostream& operator<<(ostream& o, const pair<S, T>& p) {
  return o << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& vc) {
  o << "{";
  for (const T& v : vc) o << v << ",";
  o << "}";
  return o;
}
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int N, M;
  cin >> N >> M;
  V<int> f(M + 2);
  while (N--) {
    int l, r;
    cin >> l >> r;
    r++;
    int mn = 1e9;
    for (int k = 1; k <= int(320); k++) {
      int x = (l + k - 1) / k, y = (r + k - 1) / k;
      chmin(y, mn);
      f[x]++, f[y]--;
      mn = x;
    }
    for (int i = 1; i <= int(mn - 1); i++)
      if (l / i < r / i) {
        f[i]++, f[i + 1]--;
        void(0);
      }
  }
  for (int i = 0; i < int(M); i++) f[i + 1] += f[i];
  for (int i = 1; i <= int(M); i++) cout << f[i] << '\n';
}
