#include <bits/stdc++.h>
using namespace std;
using uint = unsigned;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vd = vector<double>;
using vvd = vector<vd>;
using vs = vector<string>;
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& p) {
  return os << '(' << p.first << ',' << p.second << ')';
}
template <typename Tuple>
void print_tuple(ostream&, const Tuple&) {}
template <typename Car, typename... Cdr, typename Tuple>
void print_tuple(ostream& os, const Tuple& t) {
  print_tuple<Cdr...>(os, t);
  os << (sizeof...(Cdr) ? "," : "") << get<sizeof...(Cdr)>(t);
}
template <typename... Args>
ostream& operator<<(ostream& os, const tuple<Args...>& t) {
  print_tuple<Args...>(os << '(', t);
  return os << ')';
}
template <typename Ch, typename Tr, typename C>
basic_ostream<Ch, Tr>& operator<<(basic_ostream<Ch, Tr>& os, const C& c) {
  os << '[';
  for (auto i = begin(c); i != end(c); ++i)
    os << (i == begin(c) ? "" : " ") << *i;
  return os << ']';
}
constexpr int INF = 1e9;
constexpr int MOD = 1e9 + 7;
constexpr double EPS = 1e-9;
int main() {
  for (int n, m; cin >> n >> m && n | m;) {
    vi ls(n), rs(n);
    for (int i = int(0); i < int(n); i++) cin >> ls[i] >> rs[i];
    using S = bitset<300000>;
    vector<S> bs(m + 2), cs(m + 2);
    for (int i = int(0); i < int(m + 1); i++) cs[i].flip();
    for (int i = int(0); i < int(n); i++) {
      bs[ls[i]].set(i);
      cs[rs[i]].reset(i);
    }
    for (int i = int(0); i < int(m + 1); i++) {
      bs[i + 1] |= bs[i] & cs[i];
      cs[i + 1] &= cs[i];
    }
    for (int d = int(1); d < int(m + 1); d++) {
      S s;
      for (int i = d; i <= m; i += d) s |= bs[i];
      cout << s.count() << endl;
    }
  }
}
