#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using Vbo = vector<bool>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using VVbo = vector<Vbo>;
using VVV = vector<VV>;
using VVVll = vector<VVll>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using Pld = pair<ld, ld>;
struct fast_ios {
  fast_ios() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  };
} fast_ios_;
template <typename T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &e : v) is >> e;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (auto &e : v) os << e << " ";
  return os;
}
template <typename T>
inline int count_between(vector<T> &a, T l, T r) {
  return lower_bound(a.begin(), a.end(), r) -
         lower_bound(a.begin(), a.end(), l);
}
inline int Log2(ll x) {
  int k;
  for (k = 0; x > 0; ++k) x >>= 1;
  return k;
}
const int INF = 1 << 30;
const ll INFll = 1ll << 62;
const ld EPS = 1e-10;
const ld PI = acos(-1.0);
const int MOD = int(1e9) + 7;
int main() {
  ll n, m;
  cin >> n >> m;
  V ans(m + 1);
  for (ll i = int(0); i < int(n); ++i) {
    int l, r;
    cin >> l >> r;
    int d = 1;
    while (d <= r) {
      int a = r / d;
      int x = max(r / (a + 1), (l + a - 1) / a - 1);
      int y = r / a;
      ++ans[x];
      --ans[y];
      d = r / a + 1;
    }
  }
  for (ll i = int(0); i < int(m); ++i) ans[i + 1] += ans[i];
  for (ll i = int(0); i < int(m); ++i) cout << ans[i] << '\n';
  return 0;
}
