#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll INF = (ll)1e18;
constexpr ll MOD = (ll)1e9 + 7;
constexpr double EPS = 1e-9;
constexpr int dx[4] = {1, 0, -1, 0};
constexpr int dy[4] = {0, 1, 0, -1};
constexpr int dx8[8] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int dy8[8] = {0, 1, 0, -1, 1, -1, 1, -1};
void p() { std::cout << '\n'; }
template <typename Head, typename... Tail>
void p(Head head, Tail... tail) {
  std::cout << head << (sizeof...(tail) ? " " : "");
  p(tail...);
}
template <typename T>
inline void pv(vector<T>& v) {
  for (ll i = 0, N = v.size(); i < N; i++)
    std::cout << v[i] << " \n"[i == N - 1];
}
template <typename T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <typename T>
inline bool chmax(T& a, T b) {
  return a < b && (a = b, true);
}
template <typename T>
inline bool chmin(T& a, T b) {
  return a > b && (a = b, true);
}
template <typename T>
inline void uniq(vector<T>& v) {
  v.erase(unique(v.begin(), v.end()), v.end());
}
template <typename T>
class BinaryIndexedTree {
 public:
  class BinaryIndexedTreeNaive {
   public:
    vector<T> data;
    ll N;
    BinaryIndexedTreeNaive(ll size) : N(size + 1) { data.assign(N, 0); }
    T sum(ll i) {
      T ret = 0;
      for (--i; i >= 0; i = (i & (i + 1)) - 1) ret += data[i];
      return ret;
    }
    T sum(ll i, ll j) { return sum(j) - sum(i); }
    void add(ll i, T x) {
      for (; i < N; i |= i + 1) data[i] += x;
    }
  };
  ll size;
  BinaryIndexedTreeNaive b, c;
  BinaryIndexedTree(ll size) : size(size), b(size), c(size) {}
  void add(ll i, ll j, T x) {
    b.add(i, x * -i);
    b.add(j, x * j);
    c.add(i, x);
    c.add(j, x * -1);
  }
  T sum(ll i) { return b.sum(i + 1) + c.sum(i + 1) * i; }
  T sum(ll i, ll j) { return sum(j) - sum(i); }
};
template <typename T>
std::ostream& operator<<(std::ostream& s, BinaryIndexedTree<T>& bit) {
  for (ll i = 0; i < bit.size; i++)
    s << bit.sum(i, i + 1) << "\t\n"[i == bit.size - 1];
  return s;
}
template <typename T>
vector<T> divisor(T n) {
  vector<T> div;
  div.push_back(1);
  if (n == 1) return div;
  div.push_back(n);
  for (T i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      div.push_back(i);
      if (i * i != n) {
        div.push_back(n / i);
      }
    }
  }
  return div;
}
void solve() {
  ll N, M;
  cin >> N >> M;
  BinaryIndexedTree<ll> bit(M + 1);
  while (N--) {
    ll a, b;
    cin >> a >> b;
    if (a == b) {
      vector<ll> x = divisor(a);
      for (ll t : x) {
        bit.add(t, t + 1, 1);
      }
      continue;
    }
    ll len = ceil(sqrt(b));
    ll lt = INF;
    for (ll i = 1, i_length = (len); i <= i_length; ++i) {
      ll l = ceil((double)a / i);
      ll r = floor((double)b / i);
      if (lt <= r) r = lt - 1;
      {};
      if (l <= r) bit.add(l, r + 1, 1);
      lt = l;
    }
    ll t = ceil((double)a / len);
    bit.add(1, t, 1);
    {};
    {};
  }
  for (ll i = 1, i_length = (M); i <= i_length; ++i) {
    p(bit.sum(i, i + 1));
  }
}
signed main() {
  solve();
  return 0;
}
