#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = std::tuple<int, int>;
template <typename T, int n>
class BIT {
 public:
  BIT() { bit.fill(0); }
  void add(int k, T v, T modulo = -1) {
    while (k <= n) {
      if (modulo > 0) {
        bit[k] = (bit[k] + v) % modulo;
        bit[k] = (bit[k] + modulo) % modulo;
      } else {
        bit[k] += v;
      }
      k += k & -k;
    }
  }
  T sum(int k, T modulo = -1) {
    T res = 0;
    while (k > 0) {
      if (modulo > 0) {
        res = (res + bit[k]) % modulo;
        res = (res + modulo) % modulo;
      } else {
        res += bit[k];
      }
      k -= k & -k;
    }
    return res;
  }
  std::array<T, n + 1> bit;
};
std::vector<int> factors[100100];
std::vector<int> computeFactors(int n) {
  std::vector<int> res;
  for (ll i = 1; i * i <= n; ++i) {
    if (n % i > 0) {
      continue;
    }
    if (i == n / i) {
      res.emplace_back(i);
    } else {
      res.emplace_back(i);
      res.emplace_back(n / i);
    }
  }
  return res;
}
int N, M;
priority_queue<P, std::vector<P>, std::greater<P> > rs;
int cnt[100100];
BIT<int, 100100> bit;
int main() {
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);
  std::cin >> N >> M;
  for (int i = 0; i < N; ++i) {
    int l, r;
    std::cin >> l >> r;
    rs.emplace(l, r);
  }
  for (int i = 1; i <= M; ++i) {
    while (!rs.empty() && std::get<0>(rs.top()) == i) {
      bit.add(std::get<1>(rs.top()), 1);
      rs.pop();
    }
    vector<int> v = std::move(computeFactors(i));
    for (int d : v) {
      int n = bit.sum(i + d - 1) - bit.sum(i - 1);
      cnt[d] += n;
    }
  }
  for (int i = 1; i <= M; ++i) {
    std::cout << cnt[i] << std::endl;
  }
}
