#include <bits/stdc++.h>
using namespace std;
template <typename T>
using V = vector<T>;
template <typename T, typename U>
using P = pair<T, U>;
template <typename T>
using PQ = priority_queue<T>;
template <typename T>
using GPQ = priority_queue<T, vector<T>, greater<T>>;
using ll = long long;
template <typename T>
T sq(T a) {
  return a * a;
}
template <typename T, typename U>
void testP2(T a, U b) {
  cout << "(" << a << ", " << b << ")" << endl;
  return;
}
template <typename T>
void testV(T v) {
  cout << "[";
  for (auto i : v) {
    cout << i << ", ";
  }
  cout << "\b\b]" << endl;
  return;
}
template <typename T>
void testV2(T v) {
  for (auto sv : v) {
    testV(sv);
  }
  cout << endl;
  return;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll N, M;
  cin >> N >> M;
  V<bitset<300010>> goods(M + 1);
  for (ll i = (0); i < (N); i++) {
    ll l, r;
    cin >> l >> r;
    goods[l].set(i);
    goods[r + 1].set(i);
  }
  for (ll i = (1); i < (M + 1); i++) {
    goods[i] ^= goods[i - 1];
  }
  for (ll d = (1); d < (M + 1); d++) {
    bitset<300010> stat = goods[0];
    ll now = d;
    while (now <= M) {
      stat |= goods[now];
      now += d;
    }
    cout << stat.count() << endl;
  }
  return 0;
}
