#include <bits/stdc++.h>
using namespace std;
inline int64_t LSOne(int64_t b) { return (b & (-b)); }
class FenwickTree {
 private:
  vector<int64_t> ft;

 public:
  FenwickTree(int64_t n) { ft.assign(n + 1, 0); }
  int64_t rsq(int64_t b) {
    int sum = 0;
    for (; b; b -= LSOne(b)) {
      sum += ft[b];
    }
    return sum;
  }
  int64_t rsq(int64_t a, int64_t b) {
    if (a > b) return 0;
    return rsq(b) - rsq(a - 1);
  }
  void update(int64_t a, int64_t v) {
    for (; a < (int)ft.size(); a += LSOne(a)) {
      ft[a] += v;
    }
  }
  void update(int64_t a, int64_t b, int64_t v) {
    update(a, v);
    update(b + 1, -v);
  }
};
class arc068E {
 public:
  void solve(istream& in, ostream& out) {
    int N, M;
    in >> N >> M;
    vector<pair<int, int>> souv(N);
    for (int i = 0; i < N; ++i) {
      in >> souv[i].first >> souv[i].second;
    }
    sort(souv.begin(), souv.end(),
         [](const pair<int, int>& lhs, const pair<int, int>& rhs) {
           return (lhs.second - lhs.first) > (rhs.second - rhs.first);
         });
    FenwickTree ft(M);
    for (int i = 0; i < N; ++i) {
      ft.update(souv[i].first, souv[i].second, 1);
    }
    string ans;
    int j = 0;
    for (int i = M; i >= 1; --i) {
      while (j < N && souv[j].second - souv[j].first + 1 > i) {
        ft.update(souv[j].first, souv[j].second, -1);
        ++j;
      }
      int64_t k = i, res = 0;
      while (k <= M) {
        res += ft.rsq(k);
        k += i;
      }
      ans += "\n" + to_string(res + j);
    }
    reverse(ans.begin(), ans.end());
    out << ans << endl;
  }
};
int main() {
  std::ios::sync_with_stdio(false);
  arc068E solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
