#include <bits/stdc++.h>
using ll = long long;
using P = std::pair<ll, ll>;
template <typename T1, typename T2>
std::ostream& operator<<(std::ostream& os, std::pair<T1, T2> pa) {
  return os << "[" << pa.first << ", " << pa.second << "]";
}
template <typename T>
std::ostream& operator<<(std::ostream& os, std::vector<T> vec) {
  os << "{";
  for (int i = 0; i < vec.size(); i++)
    os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
  os << "}";
  return os;
}
const ll MOD = 1e9 + 7;
bool comp(const P& a, const P& b) {
  return (a.second - a.first) < (b.second - b.first);
}
class BinaryIndexedTree {
 private:
  long long n;
  std::vector<long long> bit;

 public:
  BinaryIndexedTree(long long i) : n(i), bit(i + 1, 0){};
  void add(long long a, long long w) {
    for (long long x = a; x <= n; x += (x & -x)) {
      bit[x] += w;
    }
  }
  long long sum(long long a) {
    long long ret = 0;
    for (long long x = a; x > 0; x -= (x & -x)) {
      ret += bit[x];
    }
    return ret;
  }
  long long lower_bound(long long key) {
    long long len = 1, temp = n, now = 0, value = 0, flag;
    while (temp / 2 != 0) {
      len *= 2;
      temp /= 2;
    }
    while (len > 0) {
      while (now + len > n) len /= 2;
      if (value + bit[now + len] >= key) {
        len /= 2;
      } else {
        now += len;
        value += bit[now];
        len /= 2;
        if (now == n) {
          return -1;
        }
      }
    }
    now++;
    return now;
  }
};
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  ll n, m;
  std::cin >> n >> m;
  std::vector<P> ivl(n);
  for (ll(i) = (0); i < (n); i++) {
    ll l, r;
    std::cin >> l >> r;
    ivl[i] = {l, r};
  }
  std::sort(ivl.begin(), ivl.end(), comp);
  BinaryIndexedTree bit(m + 10);
  ll now = 0;
  for (ll(i) = (1); i < (m + 1); i++) {
    while (ivl[now].second - ivl[now].first + 1 < i) {
      bit.add(ivl[now].first, 1);
      bit.add(ivl[now].second + 1, -1);
      now++;
    }
    ll cnt = 0;
    for (ll j = i; j <= m; j += i) {
      cnt += bit.sum(j);
    }
    std::cout << cnt + n - now << "\n";
  }
  return 0;
}
